Class FlinkAggregateExpandDistinctAggregatesRule
java.lang.Object
org.apache.calcite.plan.RelOptRule
org.apache.flink.table.planner.plan.rules.logical.FlinkAggregateExpandDistinctAggregatesRule
public final class FlinkAggregateExpandDistinctAggregatesRule
extends org.apache.calcite.plan.RelOptRule
Planner rule that expands distinct aggregates (such as
COUNT(DISTINCT x)) from a Aggregate.
How this is done depends upon the arguments to the function. If all functions have the same
argument (e.g. COUNT(DISTINCT x), SUM(DISTINCT x) both have the argument x) then
one extra Aggregate is sufficient.
If there are multiple arguments (e.g. COUNT(DISTINCT x), COUNT(DISTINCT y)) the rule
creates separate Aggregates and combines using a Join.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.calcite.plan.RelOptRule
org.apache.calcite.plan.RelOptRule.ConverterRelOptRuleOperand -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FlinkAggregateExpandDistinctAggregatesRuleThe default instance of the rule; operates only on logical expressions.static final FlinkAggregateExpandDistinctAggregatesRuleInstance of the rule that operates only on logical expressions and generates a join.final booleanFields inherited from class org.apache.calcite.plan.RelOptRule
description, operands, relBuilderFactory -
Constructor Summary
ConstructorsConstructorDescriptionFlinkAggregateExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.core.Aggregate> clazz, boolean useGroupingSets, org.apache.calcite.tools.RelBuilderFactory relBuilderFactory) FlinkAggregateExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.logical.LogicalAggregate> clazz, boolean useGroupingSets, org.apache.calcite.rel.core.RelFactories.JoinFactory joinFactory) Deprecated.FlinkAggregateExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.logical.LogicalAggregate> clazz, org.apache.calcite.rel.core.RelFactories.JoinFactory joinFactory) Deprecated. -
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
The default instance of the rule; operates only on logical expressions. -
JOIN
Instance of the rule that operates only on logical expressions and generates a join. -
useGroupingSets
public final boolean useGroupingSets
-
-
Constructor Details
-
FlinkAggregateExpandDistinctAggregatesRule
public FlinkAggregateExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.core.Aggregate> clazz, boolean useGroupingSets, org.apache.calcite.tools.RelBuilderFactory relBuilderFactory) -
FlinkAggregateExpandDistinctAggregatesRule
@Deprecated public FlinkAggregateExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.logical.LogicalAggregate> clazz, boolean useGroupingSets, org.apache.calcite.rel.core.RelFactories.JoinFactory joinFactory) Deprecated. -
FlinkAggregateExpandDistinctAggregatesRule
@Deprecated public FlinkAggregateExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.logical.LogicalAggregate> clazz, org.apache.calcite.rel.core.RelFactories.JoinFactory joinFactory) Deprecated.
-
-
Method Details
-
onMatch
public void onMatch(org.apache.calcite.plan.RelOptRuleCall call) - Specified by:
onMatchin classorg.apache.calcite.plan.RelOptRule
-