org.eigenbase.relopt.hep
Class HepRuleCall

java.lang.Object
  extended by org.eigenbase.relopt.RelOptRuleCall
      extended by org.eigenbase.relopt.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.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/relopt/hep/HepRuleCall.java#9 $
Author:
John V. Sichi

Field Summary
private  List<RelNode> results
           
 
Fields inherited from class org.eigenbase.relopt.RelOptRuleCall
rels, tracer
 
Constructor Summary
HepRuleCall(RelOptPlanner planner, RelOptRuleOperand operand, RelNode[] rels, Map<RelNode,List<RelNode>> nodeChildren, List<RelNode> parents)
           
 
Method Summary
(package private)  List<RelNode> getResults()
           
 void transformTo(RelNode rel)
          Called by the rule whenever it finds a match.
 
Methods inherited from class org.eigenbase.relopt.RelOptRuleCall
getChildRels, getOperand0, getParents, getPlanner, getRels, getRule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

results

private List<RelNode> results
Constructor Detail

HepRuleCall

HepRuleCall(RelOptPlanner planner,
            RelOptRuleOperand operand,
            RelNode[] rels,
            Map<RelNode,List<RelNode>> nodeChildren,
            List<RelNode> parents)
Method Detail

transformTo

public void transformTo(RelNode rel)
Description copied from class: RelOptRuleCall
Called by the rule whenever it finds a match. The implementation of this method will guarantee that the original relational expression (e.g., 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().

Specified by:
transformTo in class RelOptRuleCall

getResults

List<RelNode> getResults()