Class AddExchangesBelowPartialAggregationOverGroupIdRuleSet

java.lang.Object
io.trino.sql.planner.iterative.rule.AddExchangesBelowPartialAggregationOverGroupIdRuleSet

public class AddExchangesBelowPartialAggregationOverGroupIdRuleSet extends Object
Transforms
   - Exchange
     - [ Projection ]
       - Partial Aggregation
         - GroupId
 
to
   - Exchange
     - [ Projection ]
       - Partial Aggregation
         - GroupId
           - LocalExchange
             - RemoteExchange
 

Rationale: GroupId increases number of rows (number of times equal to number of grouping sets) and then partial aggregation reduces number of rows. However, under certain conditions, exchanging the rows before GroupId (before multiplication) makes partial aggregation more effective, resulting in less data being exchanged afterwards.

  • Constructor Details

  • Method Details

    • rules

      public Set<Rule<?>> rules()