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
Aggregate
s 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.RelOptRule
public void onMatch(org.apache.calcite.plan.RelOptRuleCall ruleCall)
onMatch
in class org.apache.calcite.plan.RelOptRule
protected 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 © 2022 The Apache Software Foundation. All rights reserved.