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
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)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.plan.RelOptRule
org.apache.calcite.plan.RelOptRule.ConverterRelOptRuleOperand -
Field Summary
FieldsFields inherited from class org.apache.calcite.plan.RelOptRule
description, operands, relBuilderFactory -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.flink.table.planner.plan.rules.physical.batch.PushLocalAggIntoScanRuleBase
canPushDown, getRefFiledIndex, isInputRefOnly, isProjectionNotPushedDown, pushLocalAggregateIntoScan, translateAggCallArgIndex, translateGroupingArgIndexMethods inherited from class org.apache.calcite.plan.RelOptRule
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, none, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
PushLocalHashAggWithCalcIntoScanRule
public PushLocalHashAggWithCalcIntoScanRule()
-
-
Method Details
-
matches
public boolean matches(org.apache.calcite.plan.RelOptRuleCall call) - Overrides:
matchesin classorg.apache.calcite.plan.RelOptRule
-
onMatch
public void onMatch(org.apache.calcite.plan.RelOptRuleCall call) - Specified by:
onMatchin classorg.apache.calcite.plan.RelOptRule
-