Class LogicalPlanUtils

java.lang.Object
se.liu.ida.hefquin.engine.queryplan.logical.LogicalPlanUtils

public class LogicalPlanUtils extends Object
  • Constructor Details

    • LogicalPlanUtils

      public LogicalPlanUtils()
  • Method Details

    • createPlanWithBinaryJoin

      public static LogicalPlan createPlanWithBinaryJoin(LogicalPlan subPlan1, LogicalPlan subPlan2, Iterable<QueryPlanProperty> qpInfo)
      Creates a LogicalPlan with a LogicalOpJoin as root operator and the given plans as its two subplans.
      Parameters:
      qpInfo - - to be copied as the query-planning info of the created plan; may be null, in which case plan is created without initial query-planning info
    • createPlanWithMultiwayJoin

      public static LogicalPlan createPlanWithMultiwayJoin(Iterable<QueryPlanProperty> qpInfo, LogicalPlan... subPlans)
      Creates a LogicalPlan with a LogicalOpMultiwayJoin as root operator and the given plans as its subplans.
      Parameters:
      qpInfo - - to be copied as the query-planning info of the created plan; may be null, in which case plan is created without initial query-planning info
    • createPlanWithMultiwayJoin

      public static LogicalPlan createPlanWithMultiwayJoin(List<LogicalPlan> subPlans, Iterable<QueryPlanProperty> qpInfo)
      Creates a LogicalPlan with a LogicalOpMultiwayJoin as root operator and the given plans as its subplans.
      Parameters:
      qpInfo - - to be copied as the query-planning info of the created plan; may be null, in which case plan is created without initial query-planning info
    • createPlanWithBinaryUnion

      public static LogicalPlan createPlanWithBinaryUnion(LogicalPlan subPlan1, LogicalPlan subPlan2, Iterable<QueryPlanProperty> qpInfo)
      Creates a LogicalPlan with a LogicalOpUnion as root operator and the given plans as its two subplans.
      Parameters:
      qpInfo - - to be copied as the query-planning info of the created plan; may be null, in which case plan is created without initial query-planning info
    • createPlanWithMultiwayUnion

      public static LogicalPlan createPlanWithMultiwayUnion(Iterable<QueryPlanProperty> qpInfo, LogicalPlan... subPlans)
      Creates a LogicalPlan with a LogicalOpMultiwayUnion as root operator and the given plans as its subplans.
      Parameters:
      qpInfo - - to be copied as the query-planning info of the created plan; may be null, in which case plan is created without initial query-planning info
    • createPlanWithMultiwayUnion

      public static LogicalPlan createPlanWithMultiwayUnion(List<LogicalPlan> subPlans, Iterable<QueryPlanProperty> qpInfo)
      Creates a LogicalPlan with a LogicalOpMultiwayUnion as root operator and the given plans as its subplans.
      Parameters:
      qpInfo - - to be copied as the query-planning info of the created plan; may be null, in which case plan is created without initial query-planning info
    • createPlanWithSubPlans

      public static LogicalPlan createPlanWithSubPlans(LogicalOperator rootOp, Iterable<QueryPlanProperty> qpInfo, LogicalPlan... subPlans)
      Creates a LogicalPlan with the given operator as root operator and the given plans as subplans.
      Parameters:
      rootOp - - to be used as root operator of the created plan
      qpInfo - - to be copied as the query-planning info of the created plan; may be null, in which case plan is created without initial query-planning info
      subPlans - - to be used as subplans of the created plan
      Returns:
      the created plan
    • createPlanWithSubPlans

      public static LogicalPlan createPlanWithSubPlans(LogicalOperator rootOp, Iterable<QueryPlanProperty> qpInfo, List<LogicalPlan> subPlans)
      Creates a LogicalPlan with the given operator as root operator and the plans given in the list as subplans. If the given operator is a NullaryLogicalOp, then the given list may be null.
      Parameters:
      rootOp - - to be used as root operator of the created plan
      qpInfo - - to be copied as the query-planning info of the created plan; may be null, in which case plan is created without initial query-planning info
      subPlans - - to be used as subplans of the created plan
      Returns:
      the created plan
    • isSourceAssignment

      public static boolean isSourceAssignment(LogicalPlan plan)
      Returns true if the given logical plan is a source assignment.
    • countSubplans

      public static int countSubplans(LogicalPlan plan)