Class AddIntermediateAggregations
- java.lang.Object
-
- io.prestosql.sql.planner.iterative.rule.AddIntermediateAggregations
-
- All Implemented Interfaces:
Rule<AggregationNode>
public class AddIntermediateAggregations extends Object implements Rule<AggregationNode>
Adds INTERMEDIATE aggregations between an un-grouped FINAL aggregation and its preceding PARTIAL aggregation.From:
- Aggregation (FINAL) - RemoteExchange (GATHER) - Aggregation (PARTIAL)
To:- Aggregation (FINAL) - LocalExchange (GATHER) - Aggregation (INTERMEDIATE) - LocalExchange (ARBITRARY) - RemoteExchange (GATHER) - Aggregation (INTERMEDIATE) - LocalExchange (GATHER) - Aggregation (PARTIAL)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.prestosql.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description AddIntermediateAggregations()
-
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.boolean
isEnabled(Session session)
-
-
-
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>
-
isEnabled
public boolean isEnabled(Session session)
- Specified by:
isEnabled
in interfaceRule<AggregationNode>
-
apply
public Rule.Result apply(AggregationNode aggregation, Captures captures, Rule.Context context)
- Specified by:
apply
in interfaceRule<AggregationNode>
-
-