Class HepRuleCall

java.lang.Object
org.apache.calcite.plan.RelOptRuleCall
org.apache.calcite.plan.hep.HepRuleCall

public class HepRuleCall extends RelOptRuleCall
HepRuleCall implements RelOptRuleCall for a HepPlanner. It remembers transformation results so that the planner can choose which one (if any) should replace the original expression.
  • Method Details

    • transformTo

      public void transformTo(RelNode rel, Map<RelNode,RelNode> equiv, RelHintsPropagator handler)
      Description copied from class: RelOptRuleCall
      Registers 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 by rel.getTraits() will be copied from this.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 handler handler.

      Specified by:
      transformTo in class RelOptRuleCall
      Parameters:
      rel - Relational expression equivalent to the root relational expression of the rule call, call.rels(0)
      equiv - Map of other equivalences
      handler - 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