Package org.apache.calcite.plan
Class SubstitutionVisitor.AggregateToAggregateUnifyRule
- java.lang.Object
-
- org.apache.calcite.plan.SubstitutionVisitor.UnifyRule
-
- org.apache.calcite.plan.SubstitutionVisitor.AbstractUnifyRule
-
- org.apache.calcite.plan.SubstitutionVisitor.AggregateToAggregateUnifyRule
-
- Enclosing class:
- SubstitutionVisitor
private static class SubstitutionVisitor.AggregateToAggregateUnifyRule extends SubstitutionVisitor.AbstractUnifyRule
Implementation ofSubstitutionVisitor.UnifyRule
that matches aLogicalAggregate
to aLogicalAggregate
, provided that they have the same child.
-
-
Field Summary
Fields Modifier and Type Field Description static SubstitutionVisitor.AggregateToAggregateUnifyRule
INSTANCE
-
Fields inherited from class org.apache.calcite.plan.SubstitutionVisitor.UnifyRule
queryOperand, slotCount, targetOperand
-
-
Constructor Summary
Constructors Modifier Constructor Description private
AggregateToAggregateUnifyRule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubstitutionVisitor.UnifyResult
apply(SubstitutionVisitor.UnifyRuleCall call)
Applies this rule to a particular node in a query.-
Methods inherited from class org.apache.calcite.plan.SubstitutionVisitor.AbstractUnifyRule
any, isValid, operand, query, target
-
Methods inherited from class org.apache.calcite.plan.SubstitutionVisitor.UnifyRule
copy, match
-
-
-
-
Field Detail
-
INSTANCE
public static final SubstitutionVisitor.AggregateToAggregateUnifyRule INSTANCE
-
-
Method Detail
-
apply
public SubstitutionVisitor.UnifyResult apply(SubstitutionVisitor.UnifyRuleCall call)
Description copied from class:SubstitutionVisitor.UnifyRule
Applies this rule to a particular node in a query. The goal is to convert
query
intotarget
. 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 matchestarget
; returnstarget
query
is sufficiently close to a match fortarget
; returnstarget
query
cannot be made to matchtarget
; returns null
REVIEW: Is possible that we match query PLUS one or more of its ancestors?
- Specified by:
apply
in classSubstitutionVisitor.UnifyRule
- Parameters:
call
- Input parameters
-
-