private static class SubstitutionVisitor.AggregateOnProjectToAggregateUnifyRule extends SubstitutionVisitor.AbstractUnifyRule
SubstitutionVisitor.UnifyRule that matches a
MutableAggregate on
a MutableProject query to an MutableAggregate target.
The rule is necessary when we unify query=Aggregate(x) with target=Aggregate(x, y). Query will tend to have an extra Project(x) on its input, which this rule knows is safe to ignore.
| Modifier and Type | Field and Description |
|---|---|
static SubstitutionVisitor.AggregateOnProjectToAggregateUnifyRule |
INSTANCE |
queryOperand, slotCount, targetOperand| Modifier | Constructor and Description |
|---|---|
private |
AggregateOnProjectToAggregateUnifyRule() |
| Modifier and Type | Method and Description |
|---|---|
SubstitutionVisitor.UnifyResult |
apply(SubstitutionVisitor.UnifyRuleCall call)
Applies this rule to a particular node in a query.
|
any, isValid, operand, query, targetcopy, matchpublic static final SubstitutionVisitor.AggregateOnProjectToAggregateUnifyRule INSTANCE
private AggregateOnProjectToAggregateUnifyRule()
public SubstitutionVisitor.UnifyResult apply(SubstitutionVisitor.UnifyRuleCall call)
SubstitutionVisitor.UnifyRuleApplies this rule to a particular node in a query. The goal is
to convert query into target. Before the rule is
invoked, Calcite has made sure that query's children are equivalent
to target's children.
There are 3 possible outcomes:
query already exactly matches target; returns
targetquery is sufficiently close to a match for
target; returns targetquery cannot be made to match target; returns
nullREVIEW: Is possible that we match query PLUS one or more of its ancestors?
apply in class SubstitutionVisitor.UnifyRulecall - Input parametersCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.