Class AddIntermediateAggregations
java.lang.Object
io.trino.sql.planner.iterative.rule.AddIntermediateAggregations
- All Implemented Interfaces:
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.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(AggregationNode aggregation, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.boolean
-
Constructor Details
-
AddIntermediateAggregations
public AddIntermediateAggregations()
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<AggregationNode>
-
isEnabled
- Specified by:
isEnabledin interfaceRule<AggregationNode>
-
apply
- Specified by:
applyin interfaceRule<AggregationNode>
-