public class HiveAggregateReduceFunctionsRule
extends org.apache.calcite.plan.RelOptRule
AggregateReduceFunctionsRule
that regenerates Hive specific aggregate operators.
TODO: When CALCITE-2216 is completed, we should be able to remove much of this code and
just override the relevant methods.
Planner rule that reduces aggregate functions in
Aggregates to simpler forms.
Rewrites:
| Modifier and Type | Field and Description |
|---|---|
static HiveAggregateReduceFunctionsRule |
INSTANCE
The singleton.
|
| Constructor and Description |
|---|
HiveAggregateReduceFunctionsRule()
Creates an HiveAggregateReduceFunctionsRule.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
matches(org.apache.calcite.plan.RelOptRuleCall call) |
protected void |
newAggregateRel(org.apache.calcite.tools.RelBuilder relBuilder,
org.apache.calcite.rel.core.Aggregate oldAggregate,
List<org.apache.calcite.rel.core.AggregateCall> newCalls)
Do a shallow clone of oldAggRel and update aggCalls.
|
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall ruleCall) |
public static final HiveAggregateReduceFunctionsRule INSTANCE
public HiveAggregateReduceFunctionsRule()
public boolean matches(org.apache.calcite.plan.RelOptRuleCall call)
matches in class org.apache.calcite.plan.RelOptRulepublic void onMatch(org.apache.calcite.plan.RelOptRuleCall ruleCall)
onMatch in class org.apache.calcite.plan.RelOptRuleprotected void newAggregateRel(org.apache.calcite.tools.RelBuilder relBuilder,
org.apache.calcite.rel.core.Aggregate oldAggregate,
List<org.apache.calcite.rel.core.AggregateCall> newCalls)
relBuilder - Builder of relational expressions; at the top of its
stack is its inputoldAggregate - LogicalAggregate to clone.newCalls - New list of AggregateCallsCopyright © 2019 The Apache Software Foundation. All Rights Reserved.