Class PushCalcPastChangelogNormalizeRule
java.lang.Object
org.apache.calcite.plan.RelOptRule
org.apache.calcite.plan.RelRule<PushCalcPastChangelogNormalizeRule.Config>
org.apache.flink.table.planner.plan.rules.physical.stream.PushCalcPastChangelogNormalizeRule
@Internal
@Enclosing
public class PushCalcPastChangelogNormalizeRule
extends org.apache.calcite.plan.RelRule<PushCalcPastChangelogNormalizeRule.Config>
Pushes primary key filters and used fields project through a
ChangelogNormalize operator to reduce its state size.
This rule looks for Calc → ChangelogNormalize where the Calc
contains a filter condition or a projection. The condition is transformed into CNF and then each
conjunction is tested for whether it affects only primary key columns. If such conditions or
projection exist, they are moved into a new, separate Calc and pushed through the
ChangelogNormalize operator. ChangelogNormalize keeps state for every unique key it encounters,
thus pushing filters on the primary key and projection on values in front of it helps reduce the
size of its state.
Note that pushing primary key filters is safe to do, but pushing any other filters can lead to incorrect results.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceConfiguration forPushCalcPastChangelogNormalizeRule.Nested classes/interfaces inherited from class org.apache.calcite.plan.RelRule
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 -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Methods inherited from class org.apache.calcite.plan.RelOptRule
any, convert, convert, convertList, convertOperand, convertOperand, equals, equals, getOperand, getOperands, getOutConvention, getOutTrait, hashCode, matches, none, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered
-
Field Details
-
INSTANCE
public static final org.apache.calcite.plan.RelOptRule INSTANCE
-
-
Constructor Details
-
PushCalcPastChangelogNormalizeRule
-
-
Method Details
-
onMatch
public void onMatch(org.apache.calcite.plan.RelOptRuleCall call) - Specified by:
onMatchin classorg.apache.calcite.plan.RelOptRule
-