Class DruidAggregateRemoveRedundancyRule

java.lang.Object
org.apache.calcite.plan.RelOptRule
org.apache.druid.sql.calcite.rule.logical.DruidAggregateRemoveRedundancyRule
All Implemented Interfaces:
org.apache.calcite.rel.rules.TransformationRule

@Enclosing public class DruidAggregateRemoveRedundancyRule extends org.apache.calcite.plan.RelOptRule implements org.apache.calcite.rel.rules.TransformationRule
Planner rule that recognizes a Aggregate on top of a Project and if possible aggregate through the project or removes the project.

This is updated version of AggregateProjectMergeRule to be able to handle expressions.

  • Nested Class Summary

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

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

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

    description, operands, relBuilderFactory
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable org.apache.calcite.rel.RelNode
    apply(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.plan.RelOptRule

    any, convert, convert, 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
  • Method Details

    • instance

      public static DruidAggregateRemoveRedundancyRule instance()
    • onMatch

      public void onMatch(org.apache.calcite.plan.RelOptRuleCall call)
      Specified by:
      onMatch in class org.apache.calcite.plan.RelOptRule
    • apply

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