public class TwoStageOptimizedWindowAggregateRule
extends org.apache.calcite.plan.RelOptRule
StreamPhysicalWindowAggregate
on StreamPhysicalExchange
with
following condition:
This optimization is as known as local-global optimization for reducing data-shuffling. It splits window aggregation into two-stage window aggregation, i.e. local-aggregation and global-aggregation. The local-aggregation produces a partial result for each group and window slice before shuffle in stage 1, and then the partially aggregated results are shuffled by group key to global-aggregation which produces the final result in stage 2.
Modifier and Type | Field and Description |
---|---|
static TwoStageOptimizedWindowAggregateRule |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
boolean |
matches(org.apache.calcite.plan.RelOptRuleCall call) |
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall call) |
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 TwoStageOptimizedWindowAggregateRule INSTANCE
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.