Class PushLocalHashAggWithCalcIntoScanRule

java.lang.Object
org.apache.calcite.plan.RelOptRule
org.apache.flink.table.planner.plan.rules.physical.batch.PushLocalAggIntoScanRuleBase
org.apache.flink.table.planner.plan.rules.physical.batch.PushLocalHashAggWithCalcIntoScanRule

public class PushLocalHashAggWithCalcIntoScanRule extends PushLocalAggIntoScanRuleBase
Planner rule that tries to push a local hash aggregate which with calc into a BatchPhysicalTableSourceScan whose table is a TableSourceTable with a source supporting SupportsAggregatePushDown.

Suppose we have the original physical plan:


 BatchPhysicalHashAggregate (global)
 +- BatchPhysicalExchange (hash by group keys if group keys is not empty, else singleton)
    +- BatchPhysicalLocalHashAggregate (local)
       +- BatchPhysicalCalc (filed projection only)
          +- BatchPhysicalTableSourceScan
 

This physical plan will be rewritten to:


 BatchPhysicalHashAggregate (global)
 +- BatchPhysicalExchange (hash by group keys if group keys is not empty, else singleton)
    +- BatchPhysicalTableSourceScan (with local aggregate pushed down)
 
  • Field Details

  • Constructor Details

    • PushLocalHashAggWithCalcIntoScanRule

      public PushLocalHashAggWithCalcIntoScanRule()
  • Method Details

    • matches

      public boolean matches(org.apache.calcite.plan.RelOptRuleCall call)
      Overrides:
      matches in class org.apache.calcite.plan.RelOptRule
    • onMatch

      public void onMatch(org.apache.calcite.plan.RelOptRuleCall call)
      Specified by:
      onMatch in class org.apache.calcite.plan.RelOptRule