Class PhysicalPlanFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckUnaryOpApplicableToUnionPlan(PhysicalPlan unionPlan) Returnstrueif the given plan has a union operator as its root operator and all subplans under this union are of one of the following forms: i) a request, ii) a filter over a request, iii) an l2g operator over either a request or a filter with a request.static PhysicalPlancreatePlan(BinaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator.static PhysicalPlancreatePlan(LogicalOperator lop, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan... subplans) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator.static PhysicalPlancreatePlan(LogicalOperator lop, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan... subplans) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator.static PhysicalPlancreatePlan(NaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, List<PhysicalPlan> subplans) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator.static PhysicalPlancreatePlan(NaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan... subplans) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator.static PhysicalPlancreatePlan(NullaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator.static PhysicalPlancreatePlan(UnaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan subplan) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator.static PhysicalPlancreatePlan(BinaryPhysicalOp rootOp, QueryPlanningInfo qpInfo, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a physical plan with the given root operator.static PhysicalPlancreatePlan(NaryPhysicalOp rootOp, QueryPlanningInfo qpInfo, List<PhysicalPlan> subplans) Creates a physical plan with the given root operator.static PhysicalPlancreatePlan(NaryPhysicalOp rootOp, QueryPlanningInfo qpInfo, PhysicalPlan... subplans) Creates a physical plan with the given root operator.static PhysicalPlancreatePlan(NullaryPhysicalOp rootOp, QueryPlanningInfo qpInfo) Creates a physical plan with the given root operator.static PhysicalPlancreatePlan(PhysicalOperator pop, QueryPlanningInfo qpInfo, PhysicalPlan... subplans) Creates a physical plan in which the root operator is the default physical operator for the given logical operator, as perLogicalToPhysicalOpConverter.static PhysicalPlancreatePlan(PhysicalOperator pop, PhysicalPlan... subplans) Creates a physical plan in which the root operator is the default physical operator for the given logical operator, as perLogicalToPhysicalOpConverter.static PhysicalPlancreatePlan(UnaryPhysicalOp rootOp, QueryPlanningInfo qpInfo, PhysicalPlan subplan) Creates a physical plan with the given root operator.static PhysicalPlancreatePlanWithDefaultUnaryOpIfPossible(PhysicalPlan inputPlan, PhysicalPlan nextPlan, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop) If the second of the two given plans is either a request, a filter with request, or a union over requests, then this function turns the request(s) into gpAdd operators with the first given plan as subplan.static PhysicalPlancreatePlanWithJoin(PhysicalPlan subplan1, PhysicalPlan subplan2, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop) Creates a plan with a binary join as root operator, using the default physical operator for such a join (as per the givenLogicalToPhysicalOpConverter).static PhysicalPlancreatePlanWithJoin(PhysicalPlan subplan1, PhysicalPlan subplan2, LogicalToPhysicalOpConverter lop2pop) Creates a plan with a binary join as root operator, using the default physical operator for such a join (as per the givenLogicalToPhysicalOpConverter).static PhysicalPlanCreates a plan with a request operator as root operator.static PhysicalPlancreatePlanWithUnaryOpForUnionPlan(PhysicalPlan inputPlan, PhysicalPlan unionPlan, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop) This function takes two physical plans as input, with the assumptions that the second of these plans i) has a union as its root operator and ii) every sub plan under this union is either a request or a filter with a request.static List<PhysicalPlan> enumeratePlansWithUnaryOpFromReq(PhysicalOpRequest<?, ?> req, PhysicalPlan subplan, LogicalToPhysicalOpConverter lop2pop) static PhysicalPlanstatic PhysicalPlanstatic PhysicalPlanstatic PhysicalPlanstatic PhysicalPlan
-
Constructor Details
-
PhysicalPlanFactory
public PhysicalPlanFactory()
-
-
Method Details
-
createPlan
public static PhysicalPlan createPlan(LogicalOperator lop, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan... subplans) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator. The given subplans become children of the root operator. -
createPlan
public static PhysicalPlan createPlan(LogicalOperator lop, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan... subplans) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator. The given subplans become children of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
Creates a physical plan in which the root operator is the default physical operator for the given logical operator, as perLogicalToPhysicalOpConverter. The given subplans become children of the root operator. -
createPlan
public static PhysicalPlan createPlan(PhysicalOperator pop, QueryPlanningInfo qpInfo, PhysicalPlan... subplans) Creates a physical plan in which the root operator is the default physical operator for the given logical operator, as perLogicalToPhysicalOpConverter. The given subplans become children of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlanWithRequest
Creates a plan with a request operator as root operator. -
createPlan
public static PhysicalPlan createPlan(NullaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
Creates a physical plan with the given root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
public static PhysicalPlan createPlan(UnaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan subplan) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator. The given subplan becomes the child of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
public static PhysicalPlan createPlan(UnaryPhysicalOp rootOp, QueryPlanningInfo qpInfo, PhysicalPlan subplan) Creates a physical plan with the given root operator. The given subplan becomes the single child of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlanWithJoin
public static PhysicalPlan createPlanWithJoin(PhysicalPlan subplan1, PhysicalPlan subplan2, LogicalToPhysicalOpConverter lop2pop) Creates a plan with a binary join as root operator, using the default physical operator for such a join (as per the givenLogicalToPhysicalOpConverter). -
createPlanWithJoin
public static PhysicalPlan createPlanWithJoin(PhysicalPlan subplan1, PhysicalPlan subplan2, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop) Creates a plan with a binary join as root operator, using the default physical operator for such a join (as per the givenLogicalToPhysicalOpConverter).The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the resulting plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
public static PhysicalPlan createPlan(BinaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator. The given subplans become children of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
public static PhysicalPlan createPlan(BinaryPhysicalOp rootOp, QueryPlanningInfo qpInfo, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a physical plan with the given root operator. The given subplans become children of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
public static PhysicalPlan createPlan(NaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, PhysicalPlan... subplans) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator. The given subplans become children of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
public static PhysicalPlan createPlan(NaryLogicalOp rootOp, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop, List<PhysicalPlan> subplans) Creates a physical plan in which the root operator is the physical operator that the givenLogicalToPhysicalOpConverterreturns for the given logical operator. The given subplans become children of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
public static PhysicalPlan createPlan(NaryPhysicalOp rootOp, QueryPlanningInfo qpInfo, PhysicalPlan... subplans) Creates a physical plan with the given root operator. The given subplans become children of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlan
public static PhysicalPlan createPlan(NaryPhysicalOp rootOp, QueryPlanningInfo qpInfo, List<PhysicalPlan> subplans) Creates a physical plan with the given root operator. The given subplans become children of the root operator.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
enumeratePlansWithUnaryOpFromReq
public static List<PhysicalPlan> enumeratePlansWithUnaryOpFromReq(PhysicalOpRequest<?, ?> req, PhysicalPlan subplan, LogicalToPhysicalOpConverter lop2pop) -
createPlanWithUnaryOpForUnionPlan
public static PhysicalPlan createPlanWithUnaryOpForUnionPlan(PhysicalPlan inputPlan, PhysicalPlan unionPlan, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop) This function takes two physical plans as input, with the assumptions that the second of these plans i) has a union as its root operator and ii) every sub plan under this union is either a request or a filter with a request. Given such input plans, the function turns the requests under the union into gpAdd operators with the first given plan as a common subplan.The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the resulting plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
createPlanWithDefaultUnaryOpIfPossible
public static PhysicalPlan createPlanWithDefaultUnaryOpIfPossible(PhysicalPlan inputPlan, PhysicalPlan nextPlan, QueryPlanningInfo qpInfo, LogicalToPhysicalOpConverter lop2pop) If the second of the two given plans is either a request, a filter with request, or a union over requests, then this function turns the request(s) into gpAdd operators with the first given plan as subplan. Otherwise, the function returns a plan with a binary join over the two given plans (using the default physical operator).The qpInfo argument may be
null. Provide an actualQueryPlanningInfoobject only if this object already exists and the resulting plan is indeed meant to be associated with it (for instance, when creating a physical plan for a logical plan that is associated with this object). Also, do not create different physical plans with the sameQueryPlanningInfoobject because these objects may later be extended with additional properties for each plan; instead, make copies of such an object if needed. -
checkUnaryOpApplicableToUnionPlan
Returnstrueif the given plan has a union operator as its root operator and all subplans under this union are of one of the following forms: i) a request, ii) a filter over a request, iii) an l2g operator over either a request or a filter with a request.
-