Class AggregateMergeRule
java.lang.Object
org.apache.calcite.plan.RelOptRule
org.apache.druid.sql.calcite.rule.AggregateMergeRule
- Direct Known Subclasses:
AggregateMergeRule.WithoutProject,AggregateMergeRule.WithProject
public abstract class AggregateMergeRule
extends org.apache.calcite.plan.RelOptRule
Modified version of Calcite's
AggregateMergeRule, with two changes:
(1) Includes a workaround for https://issues.apache.org/jira/browse/CALCITE-7162
(2) Includes the ability to merge two Aggregate with a Project between them, by pushing the
Project below the new merged Aggregate. This is done by AggregateMergeRule.WithProject.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classImplementation matching an Aggregate on top of an Aggregate without any intervening Project.static classImplementation matching an Aggregate on top of an Aggregate with an intervening Project.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 -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAggregateMergeRule(org.apache.calcite.plan.RelOptRuleOperand operand, String description) -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.calcite.rel.RelNodeapply(org.apache.calcite.rel.core.Aggregate topAgg, org.apache.calcite.rel.core.Aggregate bottomAgg) Logic borrowed from Calcite'sAggregateMergeRuleto merge twoAggregate, with modification to work around https://issues.apache.org/jira/browse/CALCITE-7162.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, onMatch, operand, operand, operand, operand, operand, operandJ, operandJ, some, toString, unordered
-
Constructor Details
-
AggregateMergeRule
-
-
Method Details
-
apply
@Nullable protected org.apache.calcite.rel.RelNode apply(org.apache.calcite.rel.core.Aggregate topAgg, org.apache.calcite.rel.core.Aggregate bottomAgg) Logic borrowed from Calcite'sAggregateMergeRuleto merge twoAggregate, with modification to work around https://issues.apache.org/jira/browse/CALCITE-7162.
-