Class TwoStageOptimizedAggregateRule
java.lang.Object
org.apache.calcite.plan.RelOptRule
org.apache.calcite.plan.RelRule<TwoStageOptimizedAggregateRule.TwoStageOptimizedAggregateRuleConfig>
org.apache.flink.table.planner.plan.rules.physical.stream.TwoStageOptimizedAggregateRule
@Enclosing
public class TwoStageOptimizedAggregateRule
extends org.apache.calcite.plan.RelRule<TwoStageOptimizedAggregateRule.TwoStageOptimizedAggregateRuleConfig>
Rule that matches
StreamPhysicalGroupAggregate on StreamPhysicalExchange with the
following condition: 1. mini-batch is enabled in given TableConfig, 2. two-phase aggregation is
enabled in given TableConfig, 3. all aggregate functions are mergeable, 4. the input of exchange
does not satisfy the shuffle distribution,
and converts them to
StreamPhysicalGlobalGroupAggregate
+- StreamPhysicalExchange
+- StreamPhysicalLocalGroupAggregate
+- input of exchange
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceRule configuration.Nested classes/interfaces inherited from class org.apache.calcite.plan.RelRule
org.apache.calcite.plan.RelRule.Config, org.apache.calcite.plan.RelRule.Done, org.apache.calcite.plan.RelRule.MatchHandler<R extends org.apache.calcite.plan.RelOptRule>, org.apache.calcite.plan.RelRule.OperandBuilder, org.apache.calcite.plan.RelRule.OperandDetailBuilder<R extends org.apache.calcite.rel.RelNode>, org.apache.calcite.plan.RelRule.OperandTransformNested 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.RelRule
configFields inherited from class org.apache.calcite.plan.RelOptRule
description, operands, relBuilderFactory -
Method Summary
Modifier and TypeMethodDescriptionbooleanmatches(org.apache.calcite.plan.RelOptRuleCall call) static booleanmatchesTwoStage(StreamPhysicalGroupAggregate agg, org.apache.calcite.rel.RelNode realInput) voidonMatch(org.apache.calcite.plan.RelOptRuleCall call) Methods 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
-
-
Method Details
-
matches
public boolean matches(org.apache.calcite.plan.RelOptRuleCall call) - Overrides:
matchesin classorg.apache.calcite.plan.RelOptRule
-
matchesTwoStage
public static boolean matchesTwoStage(StreamPhysicalGroupAggregate agg, org.apache.calcite.rel.RelNode realInput) -
onMatch
public void onMatch(org.apache.calcite.plan.RelOptRuleCall call) - Specified by:
onMatchin classorg.apache.calcite.plan.RelOptRule
-