@API(value=EXPERIMENTAL) public class CreatesDuplicatesProperty extends Object implements PlannerProperty<Boolean>
RelationalExpression
, this will return whether the expression might produce multiple instances
of the same record. If the given expression is a KeyExpression
, then this will return whether the
expression might return multiple results for the same record.Modifier and Type | Method and 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.
|
boolean |
shouldVisit(ExpressionRef<? extends RelationalExpression> ref)
Return whether the property should visit the subtree rooted at the given expression.
|
boolean |
shouldVisit(RelationalExpression expression)
Return whether the property should visit the subtree rooted at the given expression.
|
public boolean shouldVisit(@Nonnull RelationalExpression expression)
PlannerProperty
shouldVisit()
is called on that node.
If shouldVisit()
returns false
, then PlannerProperty.evaluateAtExpression(RelationalExpression, List)
will
not be called on the given expression.shouldVisit
in interface PlannerProperty<Boolean>
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 RelationalExpression> 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<Boolean>
ref
- the expression reference to visittrue
if the members of ref
should be visited and false
if they should not be visited@Nonnull public Boolean evaluateAtExpression(@Nonnull RelationalExpression expression, @Nonnull List<Boolean> childResults)
PlannerProperty
evaluateAtExpression()
is called on that node.evaluateAtExpression
in interface PlannerProperty<Boolean>
expression
- the cursor to visitchildResults
- the results of the property evaluated at the children of expression
@Nonnull public Boolean evaluateAtRef(@Nonnull ExpressionRef<? extends RelationalExpression> ref, @Nonnull List<Boolean> memberResults)
PlannerProperty
evaluateAtRef()
is called on that node.evaluateAtRef
in interface PlannerProperty<Boolean>
ref
- the expression reference to visitmemberResults
- the results of the property evaluated at the members of ref
public static boolean evaluate(@Nonnull ExpressionRef<? extends RelationalExpression> ref, @Nonnull PlanContext context)
public static boolean evaluate(@Nonnull RelationalExpression expression, @Nonnull PlanContext context)