Class TransformCorrelatedDistinctAggregationWithProjection
java.lang.Object
io.trino.sql.planner.iterative.rule.TransformCorrelatedDistinctAggregationWithProjection
- All Implemented Interfaces:
Rule<CorrelatedJoinNode>
public class TransformCorrelatedDistinctAggregationWithProjection
extends Object
implements Rule<CorrelatedJoinNode>
This rule decorrelates a correlated subquery of LEFT correlated join with distinct operator (grouped aggregation with no aggregation assignments)
Transforms:
- CorrelatedJoin LEFT (correlation: [c], filter: true, output: a, x)
- Input (a, c)
- Project (x invalid input: '<'- b + 100)
- Aggregation "distinct operator" group by [b]
- Source (b) with correlated filter (b > c)
Into:
- Project (a invalid input: '<'- a, x invalid input: '<'- b + 100) - Aggregation "distinct operator" group by [a, c, unique, b] - LEFT join (filter: b > c) - UniqueId (unique) - Input (a, c) - Source (b) decorrelated
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
ConstructorsConstructorDescriptionTransformCorrelatedDistinctAggregationWithProjection(PlannerContext plannerContext) -
Method Summary
Modifier and TypeMethodDescriptionapply(CorrelatedJoinNode correlatedJoinNode, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
TransformCorrelatedDistinctAggregationWithProjection
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<CorrelatedJoinNode>
-