Interface QueryPlan
- All Known Subinterfaces:
LogicalPlan,LogicalPlanWithBinaryRoot,LogicalPlanWithNaryRoot,LogicalPlanWithNullaryRoot,LogicalPlanWithUnaryRoot,PhysicalPlan,PhysicalPlanWithBinaryRoot,PhysicalPlanWithNaryRoot,PhysicalPlanWithNullaryRoot,PhysicalPlanWithUnaryRoot
- All Known Implementing Classes:
BaseForQueryPlan,LogicalPlanWithBinaryRootImpl,LogicalPlanWithNaryRootImpl,LogicalPlanWithNullaryRootImpl,LogicalPlanWithUnaryRootImpl,PhysicalPlanWithBinaryRootImpl,PhysicalPlanWithNaryRootImpl,PhysicalPlanWithNullaryRootImpl,PhysicalPlanWithUnaryRootImpl
This interface serves purely an abstract purpose in the sense that it is
not meant to be instantiated directly. Instead, LogicalPlan and
PhysicalPlan) are the relevant specializations of this interfaces
that are meant to be used throughout the code base.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the variables that can be expected in the solution mappings produced by this plan.intgetID()Returns an identifier of this (sub-)plan, which should be distinct from the identifiers of all other sub-plans within the same plan.Returns an object that captures query-planning-related information about this plan.Returns the root operator of this plan.getSubPlan(int i) Returns the i-th sub-plan of this plan, where i starts at index 0 (zero).booleanReturnstrueif this plan already has aQueryPlanningInfoobject associated with it.default booleanisSamePlan(QueryPlan other) Returnstrueif this plan is the same plan as the given one.intReturns the number of sub-plans that this plan has (considering sub-plans that are direct children of the root operator of this plan).
-
Method Details
-
getID
int getID()Returns an identifier of this (sub-)plan, which should be distinct from the identifiers of all other sub-plans within the same plan. -
getRootOperator
QueryPlanOperator getRootOperator()Returns the root operator of this plan. -
numberOfSubPlans
int numberOfSubPlans()Returns the number of sub-plans that this plan has (considering sub-plans that are direct children of the root operator of this plan). -
getSubPlan
Returns the i-th sub-plan of this plan, where i starts at index 0 (zero). If the plan has fewer sub-plans (or no sub-plans at all), then aNoSuchElementExceptionwill be thrown.- Throws:
NoSuchElementException
-
getExpectedVariables
ExpectedVariables getExpectedVariables()Returns the variables that can be expected in the solution mappings produced by this plan. -
getQueryPlanningInfo
QueryPlanningInfo getQueryPlanningInfo()Returns an object that captures query-planning-related information about this plan. This object is meant to be requested and populated by the query planner.If this plan does not yet have a
QueryPlanningInfoobject associated with it, then this function creates a new (empty) one and returns that. -
hasQueryPlanningInfo
boolean hasQueryPlanningInfo()Returnstrueif this plan already has aQueryPlanningInfoobject associated with it. -
isSamePlan
Returnstrueif this plan is the same plan as the given one. Plans are considered the same if they have the same root operator, the same number of sub-plans, and the sub-plans at every index are the same as well.Notice that the
function cannot be used for the type of comparison provided by this function becauseinvalid reference
#equals(Object)takes the IDs of the plans into account (which essentially means thatinvalid reference
#equals(Object)falls back to doing ainvalid reference
#equals(Object)==comparison, because the IDs are unique).
-