Package org.apache.calcite.plan.volcano
Class VolcanoRuleCall
java.lang.Object
org.apache.calcite.plan.RelOptRuleCall
org.apache.calcite.plan.volcano.VolcanoRuleCall
VolcanoRuleCall implements the RelOptRuleCall interface
for VolcanoPlanner.-
Field Summary
FieldsFields inherited from class org.apache.calcite.plan.RelOptRuleCall
id, LOGGER, nodeInputs, operand0, rels, rule -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVolcanoRuleCall(VolcanoPlanner planner, RelOptRuleOperand operand, RelNode[] rels, Map<RelNode, List<RelNode>> nodeInputs) Creates a rule call, internal, with array to hold bindings. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidonMatch()Called when all operands have matched.voidtransformTo(RelNode rel, Map<RelNode, RelNode> equiv, RelHintsPropagator handler) Registers that a rule has produced an equivalent relational expression.Methods inherited from class org.apache.calcite.plan.RelOptRuleCall
builder, getChildRels, getMetadataQuery, getOperand0, getParents, getPlanner, getRelList, getRels, getRule, isRuleExcluded, rel, setChildRels, transformTo, transformTo, transformTo
-
Field Details
-
volcanoPlanner
-
-
Constructor Details
-
VolcanoRuleCall
protected VolcanoRuleCall(VolcanoPlanner planner, RelOptRuleOperand operand, RelNode[] rels, Map<RelNode, List<RelNode>> nodeInputs) Creates a rule call, internal, with array to hold bindings.- Parameters:
planner- Planneroperand- First operand of the rulerels- Array which will hold the matched relational expressionsnodeInputs- For each node which matched withmatchAnyChildren= true, a list of the node's inputs
-
-
Method Details
-
transformTo
Description copied from class:RelOptRuleCallRegisters that a rule has produced an equivalent relational expression.Called by the rule whenever it finds a match. The implementation of this method guarantees that the original relational expression (that is,
this.rels[0]) has its traits propagated to the new relational expression (rel) and its unregistered children. Any trait not specifically set in the RelTraitSet returned byrel.getTraits()will be copied fromthis.rels[0].getTraitSet().The hints of the root relational expression of the rule call(
this.rels[0]) are copied to the new relational expression(rel) with specified handlerhandler.- Specified by:
transformToin classRelOptRuleCall- Parameters:
rel- Relational expression equivalent to the root relational expression of the rule call,call.rels(0)equiv- Map of other equivalenceshandler- Handler to customize the relational expression that registers into the planner, the first parameter is the root relational expression and the second parameter is the new relational expression
-
onMatch
protected void onMatch()Called when all operands have matched.
-