Class SingleDistinctAggregationToGroupBy
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.SingleDistinctAggregationToGroupBy
-
- All Implemented Interfaces:
Rule<AggregationNode>
public class SingleDistinctAggregationToGroupBy extends Object implements Rule<AggregationNode>
Implements distinct aggregations with similar inputs by transforming plans of the following shape:- Aggregation GROUP BY (k) F1(DISTINCT s0, s1, ...), F2(DISTINCT s0, s1, ...), - X
into- Aggregation GROUP BY (k) F1(x) F2(x) - Aggregation GROUP BY (k, s0, s1, ...) - X
Assumes s0, s1, ... are symbol references (i.e., complex expressions have been pre-projected)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description SingleDistinctAggregationToGroupBy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Result
apply(AggregationNode aggregation, 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:Rule
Returns a pattern to which plan nodes this rule applies.- Specified by:
getPattern
in interfaceRule<AggregationNode>
-
apply
public Rule.Result apply(AggregationNode aggregation, Captures captures, Rule.Context context)
- Specified by:
apply
in interfaceRule<AggregationNode>
-
-