public final class FlinkAggregateExpandDistinctAggregatesRule
extends org.apache.calcite.plan.RelOptRule
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 Aggregate
s and combines using a Join
.
Modifier and Type | Field and Description |
---|---|
static FlinkAggregateExpandDistinctAggregatesRule |
INSTANCE
The default instance of the rule; operates only on logical expressions.
|
static FlinkAggregateExpandDistinctAggregatesRule |
JOIN
Instance of the rule that operates only on logical expressions and generates a join.
|
boolean |
useGroupingSets |
Constructor and Description |
---|
FlinkAggregateExpandDistinctAggregatesRule(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.
|
Modifier and Type | Method and Description |
---|---|
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall call) |
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
public static final FlinkAggregateExpandDistinctAggregatesRule INSTANCE
public static final FlinkAggregateExpandDistinctAggregatesRule JOIN
public final boolean useGroupingSets
public FlinkAggregateExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.core.Aggregate> clazz, boolean useGroupingSets, org.apache.calcite.tools.RelBuilderFactory relBuilderFactory)
@Deprecated public FlinkAggregateExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.logical.LogicalAggregate> clazz, boolean useGroupingSets, org.apache.calcite.rel.core.RelFactories.JoinFactory joinFactory)
@Deprecated public FlinkAggregateExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.logical.LogicalAggregate> clazz, org.apache.calcite.rel.core.RelFactories.JoinFactory joinFactory)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.