public class SubPlan
extends java.lang.Object
inferConstraint(PConstraint)
).
A SubPlan is constructed by applying a POperation
on zero or more parent SubPlans.
Important maintained information:
Recommended to instantiate via a SubPlanFactory
or subclasses,
so that query planners can subclass SubPlan if needed.
Constructor and Description |
---|
SubPlan(PBody body,
POperation operation,
java.util.List<? extends SubPlan> parentPlans)
A SubPlan is constructed by applying a
POperation on zero or more parent SubPlans. |
SubPlan(PBody body,
POperation operation,
SubPlan... parentPlans)
A SubPlan is constructed by applying a
POperation on zero or more parent SubPlans. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Set<PVariable> |
getAllDeducedVariables()
Variables which have been assigned a value;
includes visible variables (see
getVisibleVariables() )
and additionally any variables hidden by a projection (see PProject ). |
java.util.Set<PConstraint> |
getAllEnforcedConstraints()
All constraints that are known to hold at this point
|
java.util.Set<TypeJudgement> |
getAllImpliedTypeJudgements(IQueryMetaContext context)
The closure of all type judgments of enforced constraints at this point.
|
PBody |
getBody() |
java.util.Set<PConstraint> |
getDeltaEnforcedConstraints()
The new constraints enforced at this stage of plan, that aren't yet enforced at parents
(results are also included in
getAllEnforcedConstraints() ) |
java.util.Set<PVariable> |
getIntroducedVariables()
Delta compared to first parent: variables that are visible here but were not visible at the first parent.
|
POperation |
getOperation() |
java.util.List<? extends SubPlan> |
getParentPlans() |
java.util.Set<PVariable> |
getVisibleVariables()
Variables which are assigned a value at this point
(results are also included in
getAllDeducedVariables() ) |
int |
hashCode() |
void |
inferConstraint(PConstraint constraint)
Indicate that a given constraint was found to be automatically satisfied at this point
without additional operations.
|
java.lang.String |
toLongString() |
java.lang.String |
toShortString() |
java.lang.String |
toString() |
public SubPlan(PBody body, POperation operation, SubPlan... parentPlans)
POperation
on zero or more parent SubPlans.public SubPlan(PBody body, POperation operation, java.util.List<? extends SubPlan> parentPlans)
POperation
on zero or more parent SubPlans.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toShortString()
public java.lang.String toLongString()
public java.util.Set<PConstraint> getAllEnforcedConstraints()
public java.util.Set<PConstraint> getDeltaEnforcedConstraints()
getAllEnforcedConstraints()
)public void inferConstraint(PConstraint constraint)
getDeltaEnforcedConstraints()
)
Warning: not propagated automatically to child plans, so best to invoke before constructing further SubPlans.
public PBody getBody()
public java.util.Set<PVariable> getVisibleVariables()
getAllDeducedVariables()
)public java.util.Set<PVariable> getAllDeducedVariables()
getVisibleVariables()
)
and additionally any variables hidden by a projection (see PProject
).public java.util.Set<PVariable> getIntroducedVariables()
public java.util.List<? extends SubPlan> getParentPlans()
public POperation getOperation()
public java.util.Set<TypeJudgement> getAllImpliedTypeJudgements(IQueryMetaContext context)
No subsumption applied.
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object