public class PushLocalSortAggWithSortIntoScanRule extends PushLocalAggIntoScanRuleBase
BatchPhysicalTableSourceScan
whose table is a TableSourceTable
with a source supporting
SupportsAggregatePushDown
. The OptimizerConfigOptions.TABLE_OPTIMIZER_SOURCE_AGGREGATE_PUSHDOWN_ENABLED
need to be true.
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)
Modifier and Type | Field and Description |
---|---|
static PushLocalSortAggWithSortIntoScanRule |
INSTANCE |
Constructor and Description |
---|
PushLocalSortAggWithSortIntoScanRule() |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(org.apache.calcite.plan.RelOptRuleCall call) |
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall call) |
canPushDown, getRefFiledIndex, isInputRefOnly, isProjectionNotPushedDown, pushLocalAggregateIntoScan, translateAggCallArgIndex, translateGroupingArgIndex
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, none, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered
public static final PushLocalSortAggWithSortIntoScanRule INSTANCE
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.