Class CreatesDuplicatesProperty
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.properties.CreatesDuplicatesProperty
-
- All Implemented Interfaces:
PlannerProperty<Boolean>
@API(EXPERIMENTAL) public class CreatesDuplicatesProperty extends Object implements PlannerProperty<Boolean>
A property that determines whether the expression may produce duplicate entries. If the given expression is aRelationalExpression
, this will return whether the expression might produce multiple instances of the same record. If the given expression is aKeyExpression
, then this will return whether the expression might return multiple results for the same record.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
evaluate(ExpressionRef<? extends RelationalExpression> ref, PlanContext context)
static boolean
evaluate(RelationalExpression expression, PlanContext context)
Boolean
evaluateAtExpression(RelationalExpression expression, List<Boolean> childResults)
Evaluate the property at the given expression, using the results of evaluating the property at its children.Boolean
evaluateAtRef(ExpressionRef<? extends RelationalExpression> ref, List<Boolean> 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
-
-
-
-
Method Detail
-
evaluateAtExpression
@Nonnull public Boolean evaluateAtExpression(@Nonnull RelationalExpression expression, @Nonnull List<Boolean> 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<Boolean>
- 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 Boolean evaluateAtRef(@Nonnull ExpressionRef<? extends RelationalExpression> ref, @Nonnull List<Boolean> 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<Boolean>
- 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 boolean evaluate(@Nonnull ExpressionRef<? extends RelationalExpression> ref, @Nonnull PlanContext context)
-
evaluate
public static boolean evaluate(@Nonnull RelationalExpression expression, @Nonnull PlanContext context)
-
-