Class PushLocalSortAggWithSortIntoScanRule
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.PushLocalSortAggWithSortIntoScanRule
Planner rule that tries to push a local sort aggregate which with sort into a
BatchPhysicalTableSourceScan whose table is a TableSourceTable with a source supporting
SupportsAggregatePushDown.
Suppose we have the original physical plan:
BatchPhysicalSortAggregate (global)
+- BatchPhysicalSort (exists if group keys are not empty)
+- BatchPhysicalExchange (hash by group keys if group keys is not empty, else singleton)
+- BatchPhysicalLocalSortAggregate (local)
+- BatchPhysicalSort (exists if group keys are not empty)
+- BatchPhysicalTableSourceScan
This physical plan will be rewritten to:
BatchPhysicalSortAggregate (global)
+- BatchPhysicalSort (exists if group keys are not empty)
+- 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
-
PushLocalSortAggWithSortIntoScanRule
public PushLocalSortAggWithSortIntoScanRule()
-
-
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
-