Class FlinkAggregateProjectMergeRule

java.lang.Object
org.apache.calcite.plan.RelOptRule
org.apache.calcite.plan.RelRule<org.apache.calcite.rel.rules.AggregateProjectMergeRule.Config>
org.apache.calcite.rel.rules.AggregateProjectMergeRule
org.apache.flink.table.planner.plan.rules.logical.FlinkAggregateProjectMergeRule
All Implemented Interfaces:
org.apache.calcite.rel.rules.TransformationRule

public class FlinkAggregateProjectMergeRule extends org.apache.calcite.rel.rules.AggregateProjectMergeRule
Extends calcite's AggregateProjectMergeRule, modification: consider the timeAttribute field when analyzing interesting fields for the LogicalWindowAggregate node while normal Aggregate node needn't.

FLINK modifications are at lines

  1. Should be removed after legacy groupWindowAggregate was removed: Lines 85 ~ 105, Lines 136 ~ 156
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.calcite.rel.rules.AggregateProjectMergeRule

    org.apache.calcite.rel.rules.AggregateProjectMergeRule.Config

    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.OperandTransform

    Nested classes/interfaces inherited from class org.apache.calcite.plan.RelOptRule

    org.apache.calcite.plan.RelOptRule.ConverterRelOptRuleOperand
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.apache.calcite.plan.RelOptRule
     

    Fields inherited from class org.apache.calcite.plan.RelRule

    config

    Fields inherited from class org.apache.calcite.plan.RelOptRule

    description, operands, relBuilderFactory
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    FlinkAggregateProjectMergeRule(org.apache.calcite.rel.rules.AggregateProjectMergeRule.Config config)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable org.apache.calcite.rel.RelNode
    newApply(org.apache.calcite.plan.RelOptRuleCall call, org.apache.calcite.rel.core.Aggregate aggregate, org.apache.calcite.rel.core.Project project)
     
    void
    onMatch(org.apache.calcite.plan.RelOptRuleCall call)
     

    Methods inherited from class org.apache.calcite.rel.rules.AggregateProjectMergeRule

    apply

    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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • INSTANCE

      public static final org.apache.calcite.plan.RelOptRule INSTANCE
  • Constructor Details

    • FlinkAggregateProjectMergeRule

      protected FlinkAggregateProjectMergeRule(org.apache.calcite.rel.rules.AggregateProjectMergeRule.Config config)
  • Method Details

    • onMatch

      public void onMatch(org.apache.calcite.plan.RelOptRuleCall call)
      Overrides:
      onMatch in class org.apache.calcite.rel.rules.AggregateProjectMergeRule
    • newApply

      public static @Nullable org.apache.calcite.rel.RelNode newApply(org.apache.calcite.plan.RelOptRuleCall call, org.apache.calcite.rel.core.Aggregate aggregate, org.apache.calcite.rel.core.Project project)