public final class HiveExpandDistinctAggregatesRule
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 HiveExpandDistinctAggregatesRule |
INSTANCE
The default instance of the rule; operates only on logical expressions.
|
Constructor and Description |
---|
HiveExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.core.Aggregate> clazz,
org.apache.calcite.rel.core.RelFactories.ProjectFactory projectFactory) |
Modifier and Type | Method and Description |
---|---|
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall call) |
public static final HiveExpandDistinctAggregatesRule INSTANCE
public HiveExpandDistinctAggregatesRule(Class<? extends org.apache.calcite.rel.core.Aggregate> clazz, org.apache.calcite.rel.core.RelFactories.ProjectFactory projectFactory)
Copyright © 2017 The Apache Software Foundation. All rights reserved.