Class MultipleDistinctAggregationToMarkDistinct
- java.lang.Object
-
- io.trino.sql.planner.iterative.rule.MultipleDistinctAggregationToMarkDistinct
-
- All Implemented Interfaces:
Rule<AggregationNode>
public class MultipleDistinctAggregationToMarkDistinct extends Object implements Rule<AggregationNode>
Implements distinct aggregations with different inputs by transforming plans of the following shape:- Aggregation GROUP BY (k) F1(DISTINCT a0, a1, ...) F2(DISTINCT b0, b1, ...) F3(c0, c1, ...) - Xinto- Aggregation GROUP BY (k) F1(a0, a1, ...) mask ($0) F2(b0, b1, ...) mask ($1) F3(c0, c1, ...) - MarkDistinct (k, a0, a1, ...) -> $0 - MarkDistinct (k, b0, b1, ...) -> $1 - X
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description MultipleDistinctAggregationToMarkDistinct()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Resultapply(AggregationNode parent, Captures captures, Rule.Context context)Pattern<AggregationNode>getPattern()Returns a pattern to which plan nodes this rule applies.
-
-
-
Method Detail
-
getPattern
public Pattern<AggregationNode> getPattern()
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<AggregationNode>
-
apply
public Rule.Result apply(AggregationNode parent, Captures captures, Rule.Context context)
- Specified by:
applyin interfaceRule<AggregationNode>
-
-