public class HiveAggregateProjectMergeRule
extends org.apache.calcite.plan.RelOptRule
HiveAggregate
on top of a HiveProject
and if possible
aggregate through the project or removes the project.
This is only possible when the grouping expressions and arguments to the aggregate functions are field references (i.e. not expressions).
In some cases, this rule has the effect of trimming: the aggregate will use fewer columns than the project did.
Modifier and Type | Field and Description |
---|---|
static HiveAggregateProjectMergeRule |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
static org.apache.calcite.rel.RelNode |
apply(HiveAggregate aggregate,
HiveProject project) |
boolean |
matches(org.apache.calcite.plan.RelOptRuleCall call) |
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall call) |
public static final HiveAggregateProjectMergeRule INSTANCE
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 call)
onMatch
in class org.apache.calcite.plan.RelOptRule
public static org.apache.calcite.rel.RelNode apply(HiveAggregate aggregate, HiveProject project)
Copyright © 2021 The Apache Software Foundation. All rights reserved.