Class PhysicalPlanFactory
java.lang.Object
se.liu.ida.hefquin.engine.queryplan.utils.PhysicalPlanFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckUnaryOpApplicableToUnionPlan(PhysicalPlan unionPlan) Check whether all operators under the UNION operator belong to any of the following: - The operator is a request - If the operator is a filter, then under that filter there must be a request, - If the operator is a L2G operator, under the L2G operator, there must be a request or a filter operator with requests.static PhysicalPlancreatePlan(BinaryLogicalOp rootOp, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a physical plan in which the root operator is the default physical operator for the given logical operator, as perLogicalToPhysicalOpConverter.static PhysicalPlancreatePlan(LogicalOperator lop, 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(NaryLogicalOp rootOp, List<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(NaryLogicalOp rootOp, 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(NullaryLogicalOp rootOp) Creates a physical plan in which the root operator is the default physical operator for the given logical operator, as perLogicalToPhysicalOpConverter.static PhysicalPlancreatePlan(UnaryLogicalOp rootOp, PhysicalPlan subplan) Creates a physical plan in which the root operator is the default physical operator for the given logical operator, as perLogicalToPhysicalOpConverter.static PhysicalPlancreatePlan(BinaryPhysicalOp rootOp, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a physical plan with the given root operator.static PhysicalPlancreatePlan(NaryPhysicalOp rootOp, List<PhysicalPlan> subplans) Creates a physical plan with the given root operator.static PhysicalPlancreatePlan(NaryPhysicalOp rootOp, PhysicalPlan... subplans) Creates a physical plan with the given root operator.static PhysicalPlancreatePlan(NullaryPhysicalOp rootOp) Creates a physical plan with the given root operator.static PhysicalPlancreatePlan(PhysicalOperator lop, 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, PhysicalPlan subplan) Creates a physical plan with the given root operator.static PhysicalPlancreatePlanBasedOnTypeOfGivenPhysicalOp(LogicalOpBGPAdd lop, Class<? extends PhysicalOperator> opClass, PhysicalPlan subplan) Creates a physical plan with a bgpAdd as root operator.static PhysicalPlancreatePlanWithBindJoin(LogicalOpTPAdd lop, PhysicalPlan subplan) Creates a plan with a bind join as root operator.static PhysicalPlancreatePlanWithBindJoinFILTER(LogicalOpBGPAdd lop, PhysicalPlan subplan) Creates a plan with a bind join as root operator.static PhysicalPlancreatePlanWithBindJoinFILTER(LogicalOpGPAdd lop, PhysicalPlan subplan) Creates a plan with a FILTER-based bind join as root operator.static PhysicalPlancreatePlanWithBindJoinFILTER(LogicalOpTPAdd lop, PhysicalPlan subplan) Creates a plan with a bind join as root operator.static PhysicalPlancreatePlanWithBindJoinUNION(LogicalOpBGPAdd lop, PhysicalPlan subplan) Creates a plan with a bind join as root operator.static PhysicalPlancreatePlanWithBindJoinUNION(LogicalOpGPAdd lop, PhysicalPlan subplan) Creates a plan with a UNION-based bind join as root operator.static PhysicalPlancreatePlanWithBindJoinUNION(LogicalOpTPAdd lop, PhysicalPlan subplan) Creates a plan with a bind join as root operator.static PhysicalPlancreatePlanWithBindJoinVALUES(LogicalOpBGPAdd lop, PhysicalPlan subplan) Creates a plan with a bind join as root operator.static PhysicalPlancreatePlanWithBindJoinVALUES(LogicalOpGPAdd lop, PhysicalPlan subplan) Creates a plan with a VALUES-based bind join as root operator.static PhysicalPlancreatePlanWithBindJoinVALUES(LogicalOpTPAdd lop, PhysicalPlan subplan) Creates a plan with a bind join as root operator.static PhysicalPlancreatePlanWithDefaultUnaryOpIfPossible(PhysicalPlan inputPlan, PhysicalPlan nextPlan) If the nextPlan is in the form of a request, filter with request, or union with requests, this function turns the requests into xxAdd operators with the inputPlan as subplans.static PhysicalPlancreatePlanWithHashJoin(LogicalOpJoin lop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a hash join as root operator.static PhysicalPlancreatePlanWithHashJoin(PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a hash join as root operator.static PhysicalPlancreatePlanWithIndexNLJ(LogicalOpBGPAdd lop, PhysicalPlan subplan) Creates a plan with an index nested loops join as root operator.static PhysicalPlancreatePlanWithIndexNLJ(LogicalOpGPAdd lop, PhysicalPlan subplan) Creates a plan with an index nested loops join as root operator.static PhysicalPlancreatePlanWithIndexNLJ(LogicalOpTPAdd lop, PhysicalPlan subplan) Creates a plan with an index nested loops join as root operator.static PhysicalPlancreatePlanWithJoin(PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a binary join as root operator.static PhysicalPlancreatePlanWithNaiveNLJ(LogicalOpJoin lop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a naive nested loops join as root operator.static PhysicalPlancreatePlanWithNaiveNLJ(PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a naive nested loops join as root operator.static <R extends DataRetrievalRequest,M extends FederationMember>
PhysicalPlancreatePlanWithRequest(LogicalOpRequest<R, M> lop) Creates a plan with a request operator as root operator.static PhysicalPlancreatePlanWithSymmetricHashJoin(LogicalOpJoin lop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a symmetric hash join as root operator.static PhysicalPlancreatePlanWithSymmetricHashJoin(PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a symmetric hash join as root operator.static PhysicalPlancreatePlanWithUnaryOpForUnionPlan(PhysicalPlan inputPlan, PhysicalPlan unionPlan) This function take a inputPlan and unionPlan as input, where the unionPlan is required to be a plan with union as root operator, and all subPlans under the UNION are all requests or filters with request.static PhysicalPlancreatePlanWithUnion(LogicalOpUnion lop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a binary union as root operator.static PhysicalPlancreatePlanWithUnion(PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a binary union as root operator.static List<PhysicalPlan>enumeratePlansWithUnaryOpFromReq(PhysicalOpRequest<?, ?> req, PhysicalPlan subplan) static PhysicalPlanstatic PhysicalPlanstatic PhysicalPlanstatic PhysicalPlanstatic PhysicalPlanstatic PhysicalPlanstatic PhysicalPlanstatic PhysicalPlanstatic PhysicalPlan
-
Constructor Details
-
PhysicalPlanFactory
public PhysicalPlanFactory()
-
-
Method Details
-
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
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. -
createPlanWithRequest
public static <R extends DataRetrievalRequest,M extends FederationMember> PhysicalPlan createPlanWithRequest(LogicalOpRequest<R, M> lop) Creates a plan with a request operator as root operator. -
createPlan
Creates a physical plan in which the root operator is the default physical operator for the given logical operator, as perLogicalToPhysicalOpConverter. -
createPlan
Creates a physical plan with the given root operator. -
createPlanWithBindJoin
Creates a plan with a bind join as root operator. -
createPlanWithBindJoinFILTER
Creates a plan with a bind join as root operator. -
createPlanWithBindJoinUNION
Creates a plan with a bind join as root operator. -
createPlanWithBindJoinVALUES
Creates a plan with a bind join as root operator. -
createPlanWithIndexNLJ
Creates a plan with an index nested loops join as root operator. -
createPlanWithIndexNLJ
Creates a plan with an index nested loops join as root operator. -
createPlanWithBindJoinFILTER
Creates a plan with a bind join as root operator. -
createPlanWithBindJoinUNION
Creates a plan with a bind join as root operator. -
createPlanWithBindJoinVALUES
Creates a plan with a bind join as root operator. -
createPlanWithIndexNLJ
Creates a plan with an index nested loops join as root operator. -
createPlanWithBindJoinFILTER
Creates a plan with a FILTER-based bind join as root operator. -
createPlanWithBindJoinUNION
Creates a plan with a UNION-based bind join as root operator. -
createPlanWithBindJoinVALUES
Creates a plan with a VALUES-based bind join as root operator. -
createPlan
Creates a physical plan in which the root operator is the default physical operator for the given logical operator, as perLogicalToPhysicalOpConverter. The given subplan becomes the single child of the root operator. -
createPlan
Creates a physical plan with the given root operator. The given subplan becomes the single child of the root operator. -
createPlanBasedOnTypeOfGivenPhysicalOp
public static PhysicalPlan createPlanBasedOnTypeOfGivenPhysicalOp(LogicalOpBGPAdd lop, Class<? extends PhysicalOperator> opClass, PhysicalPlan subplan) Creates a physical plan with a bgpAdd as root operator. The root operator uses the same physical algorithm as the given physical operator, which is usually a specific physical operator for bgpAdd. The given subplan becomes the single child of the root operator. -
createPlanWithUnion
Creates a plan with a binary union as root operator. -
createPlanWithUnion
public static PhysicalPlan createPlanWithUnion(LogicalOpUnion lop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a binary union as root operator. -
createPlanWithHashJoin
Creates a plan with a hash join as root operator. -
createPlanWithHashJoin
public static PhysicalPlan createPlanWithHashJoin(LogicalOpJoin lop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a hash join as root operator. -
createPlanWithSymmetricHashJoin
public static PhysicalPlan createPlanWithSymmetricHashJoin(PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a symmetric hash join as root operator. -
createPlanWithSymmetricHashJoin
public static PhysicalPlan createPlanWithSymmetricHashJoin(LogicalOpJoin lop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a symmetric hash join as root operator. -
createPlanWithNaiveNLJ
Creates a plan with a naive nested loops join as root operator. -
createPlanWithNaiveNLJ
public static PhysicalPlan createPlanWithNaiveNLJ(LogicalOpJoin lop, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a plan with a naive nested loops join as root operator. -
createPlanWithJoin
Creates a plan with a binary join as root operator. The root operator is the default physical operator -
createPlan
public static PhysicalPlan createPlan(BinaryLogicalOp rootOp, PhysicalPlan subplan1, PhysicalPlan subplan2) 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(BinaryPhysicalOp rootOp, PhysicalPlan subplan1, PhysicalPlan subplan2) Creates a physical plan with the given root operator. The given subplans become children of the root operator. -
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
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
Creates a physical plan with the given root operator. The given subplans become children of the root operator. -
createPlan
Creates a physical plan with the given root operator. The given subplans become children of the root operator. -
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
extractRequestAsPlan
-
enumeratePlansWithUnaryOpFromReq
public static List<PhysicalPlan> enumeratePlansWithUnaryOpFromReq(PhysicalOpRequest<?, ?> req, PhysicalPlan subplan) -
createPlanWithUnaryOpForUnionPlan
public static PhysicalPlan createPlanWithUnaryOpForUnionPlan(PhysicalPlan inputPlan, PhysicalPlan unionPlan) This function take a inputPlan and unionPlan as input, where the unionPlan is required to be a plan with union as root operator, and all subPlans under the UNION are all requests or filters with request. In such cases, this function turns the requests under UNION into xxAdd operators with the inputPlan as subplans. -
createPlanWithDefaultUnaryOpIfPossible
public static PhysicalPlan createPlanWithDefaultUnaryOpIfPossible(PhysicalPlan inputPlan, PhysicalPlan nextPlan) If the nextPlan is in the form of a request, filter with request, or union with requests, this function turns the requests into xxAdd operators with the inputPlan as subplans. Otherwise, it constructs a plan with a binary join between inputPlan and nextPlan (using the default physical operator) -
checkUnaryOpApplicableToUnionPlan
Check whether all operators under the UNION operator belong to any of the following: - The operator is a request - If the operator is a filter, then under that filter there must be a request, - If the operator is a L2G operator, under the L2G operator, there must be a request or a filter operator with requests.
-