Class ImplementDistinctRule
- java.lang.Object
-
- com.apple.foundationdb.record.query.plan.temp.PlannerRule<LogicalDistinctExpression>
-
- com.apple.foundationdb.record.query.plan.temp.rules.ImplementDistinctRule
-
@API(EXPERIMENTAL) public class ImplementDistinctRule extends PlannerRule<LogicalDistinctExpression>
A rule that implements a distinct expression by adding aRecordQueryUnorderedPrimaryKeyDistinctPlan
if necessary. In particular, it will only add that wrapping expression if the underlying plan itself might produce duplicate results.This rule is somewhat suspect. In particular, if the inner plan that it matches against does not produce duplicates, this rule will then return that plan. This is fine unless the plan is later modified in such a way that it then can produce duplicates. At the moment, none of the rules modify a
RecordQueryPlan
once it has been produced, but a future rule that does so may cause errors where plans erroneously produce duplicate records. To address that, the plan is to add a mechanism for enforcing properties (e.g., distinctness or sort order) on the plans produced by the planner. See Issue #653.
-
-
Constructor Summary
Constructors Constructor Description ImplementDistinctRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onMatch(PlannerRuleCall call)
-
Methods inherited from class com.apple.foundationdb.record.query.plan.temp.PlannerRule
getMatcher, getRootOperator, toString
-
-
-
-
Method Detail
-
onMatch
public void onMatch(@Nonnull PlannerRuleCall call)
- Specified by:
onMatch
in classPlannerRule<LogicalDistinctExpression>
-
-