@API(value=EXPERIMENTAL) public class UnmatchedFieldsProperty extends Object implements PlannerProperty<Integer>
KeyExpression
columns (i.e., field-like KeyExpression
s
such as FieldKeyExpression
and
RecordTypeKeyExpression
) that are not matched with at
least one Comparisons.Comparison
in a planner expression
tree. This is computed over all KeyExpression
s in various IndexEntrySourceScanExpression
s.
For example, suppose that a planner expression scans two indexes:
concat(field1, field2)
, with a comparison field1 = 'foo'
concat(field1, field3, field4)
, with a comparison field1 = 'foo', field3 < 5
UnmatchedFieldsProperty
on such a planner expression is 2.Constructor and Description |
---|
UnmatchedFieldsProperty(PlanContext context) |
Modifier and Type | Method and Description |
---|---|
static int |
evaluate(PlanContext context,
PlannerExpression expression) |
Integer |
evaluateAtExpression(PlannerExpression expression,
List<Integer> childResults)
Evaluate the property at the given expression, using the results of evaluating the property at its children.
|
Integer |
evaluateAtRef(ExpressionRef<? extends PlannerExpression> ref,
List<Integer> memberResults)
Evaluate the property at the given reference, using the results of evaluating the property at its members.
|
boolean |
shouldVisit(ExpressionRef<? extends PlannerExpression> ref)
Return whether the property should visit the subtree rooted at the given expression.
|
boolean |
shouldVisit(PlannerExpression expression)
Return whether the property should visit the subtree rooted at the given expression.
|
public UnmatchedFieldsProperty(@Nonnull PlanContext context)
public boolean shouldVisit(@Nonnull PlannerExpression expression)
PlannerProperty
shouldVisit()
is called on that node.
If shouldVisit()
returns false
, then PlannerProperty.evaluateAtExpression(PlannerExpression, List)
will
not be called on the given expression.shouldVisit
in interface PlannerProperty<Integer>
expression
- the planner expression to visittrue
if the children of expression
should be visited and false
if they should not be visitedpublic boolean shouldVisit(@Nonnull ExpressionRef<? extends PlannerExpression> ref)
PlannerProperty
shouldVisit()
is called on that node.
If shouldVisit()
returns false
, then PlannerProperty.evaluateAtRef(ExpressionRef, List)
will
not be called on the given expression.shouldVisit
in interface PlannerProperty<Integer>
ref
- the expression reference to visittrue
if the members of ref
should be visited and false
if they should not be visited@Nonnull public Integer evaluateAtExpression(@Nonnull PlannerExpression expression, @Nonnull List<Integer> childResults)
PlannerProperty
evaluateAtExpression()
is called on that node.evaluateAtExpression
in interface PlannerProperty<Integer>
expression
- the cursor to visitchildResults
- the results of the property evaluated at the children of expression
@Nonnull public Integer evaluateAtRef(@Nonnull ExpressionRef<? extends PlannerExpression> ref, @Nonnull List<Integer> memberResults)
PlannerProperty
evaluateAtRef()
is called on that node.evaluateAtRef
in interface PlannerProperty<Integer>
ref
- the expression reference to visitmemberResults
- the results of the property evaluated at the members of ref
public static int evaluate(@Nonnull PlanContext context, @Nonnull PlannerExpression expression)