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)
| 限定符和类型 | 字段和说明 |
|---|---|
static PushLocalSortAggWithSortIntoScanRule |
INSTANCE |
| 构造器和说明 |
|---|
PushLocalSortAggWithSortIntoScanRule() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
matches(org.apache.calcite.plan.RelOptRuleCall call) |
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall call) |
canPushDown, getRefFiledIndex, isInputRefOnly, isProjectionNotPushedDown, pushLocalAggregateIntoScan, pushLocalAggregateIntoScan, translateAggCallArgIndex, translateGroupingArgIndexpublic static final PushLocalSortAggWithSortIntoScanRule INSTANCE
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.