Class UnmatchedFieldsProperty
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.properties.UnmatchedFieldsProperty
-
- All Implemented Interfaces:
PlannerProperty<Integer>
@API(EXPERIMENTAL) public class UnmatchedFieldsProperty extends Object implements PlannerProperty<Integer>
A property for counting the total number ofKeyExpression
columns (i.e., field-likeKeyExpression
s such asFieldKeyExpression
andRecordTypeKeyExpression
) that are not matched with at least oneComparisons.Comparison
in a planner expression tree. This is computed over allKeyExpression
s in variousIndexEntrySourceScanExpression
s.For example, suppose that a planner expression scans two indexes:
concat(field1, field2)
, with a comparisonfield1 = 'foo'
concat(field1, field3, field4)
, with a comparisonfield1 = 'foo', field3 < 5
UnmatchedFieldsProperty
on such a planner expression is 2.
-
-
Constructor Summary
Constructors Constructor Description UnmatchedFieldsProperty(PlanContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
evaluate(PlanContext context, RelationalExpression expression)
Integer
evaluateAtExpression(RelationalExpression 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 RelationalExpression> ref, List<Integer> memberResults)
Evaluate the property at the given reference, using the results of evaluating the property at its members.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.apple.foundationdb.record.query.plan.temp.PlannerProperty
evaluateAtQuantifier, shouldVisit, shouldVisit, shouldVisit
-
-
-
-
Constructor Detail
-
UnmatchedFieldsProperty
public UnmatchedFieldsProperty(@Nonnull PlanContext context)
-
-
Method Detail
-
evaluateAtExpression
@Nonnull public Integer evaluateAtExpression(@Nonnull RelationalExpression expression, @Nonnull List<Integer> childResults)
Description copied from interface:PlannerProperty
Evaluate the property at the given expression, using the results of evaluating the property at its children. Called on nodes in the graph in visit post-order of the depth-first traversal of the graph. That is, as each expression is visited (after all of its children have been visited, if applicable),evaluateAtExpression()
is called on that expression.- Specified by:
evaluateAtExpression
in interfacePlannerProperty<Integer>
- Parameters:
expression
- the cursor to visitchildResults
- the results of the property evaluated at the children ofexpression
- Returns:
- the value of property at the given expression
-
evaluateAtRef
@Nonnull public Integer evaluateAtRef(@Nonnull ExpressionRef<? extends RelationalExpression> ref, @Nonnull List<Integer> memberResults)
Description copied from interface:PlannerProperty
Evaluate the property at the given reference, using the results of evaluating the property at its members. Called on nodes in the graph in visit post-order of the depth-first traversal of the graph. That is, as each reference is visited (after all of its members have been visited, if applicable),evaluateAtRef()
is called on that reference.- Specified by:
evaluateAtRef
in interfacePlannerProperty<Integer>
- Parameters:
ref
- the expression reference to visitmemberResults
- the results of the property evaluated at the members ofref
- Returns:
- the value of property at the given reference
-
evaluate
public static int evaluate(@Nonnull PlanContext context, @Nonnull RelationalExpression expression)
-
-