org.eigenbase.relopt
Class RelTraitPropagationVisitor

java.lang.Object
  extended by org.eigenbase.rel.RelVisitor
      extended by org.eigenbase.relopt.RelTraitPropagationVisitor

public class RelTraitPropagationVisitor
extends RelVisitor

RelTraitPropagationVisitor traverses a RelNode and its unregistered children, making sure that each has a full complement of traits. When a RelNode is found to be missing one or more traits, they are copied from a RelTraitSet given during construction.

Author:
Stephan Zuercher

Field Summary
private  RelTraitSet baseTraits
           
private  RelOptPlanner planner
           
 
Constructor Summary
RelTraitPropagationVisitor(RelOptPlanner planner, RelTraitSet baseTraits)
           
 
Method Summary
 void visit(RelNode rel, int ordinal, RelNode parent)
          Visits a node during a traversal.
 
Methods inherited from class org.eigenbase.rel.RelVisitor
go, replaceRoot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

baseTraits

private final RelTraitSet baseTraits

planner

private final RelOptPlanner planner
Constructor Detail

RelTraitPropagationVisitor

public RelTraitPropagationVisitor(RelOptPlanner planner,
                                  RelTraitSet baseTraits)
Method Detail

visit

public void visit(RelNode rel,
                  int ordinal,
                  RelNode parent)
Description copied from class: RelVisitor
Visits a node during a traversal.

Overrides:
visit in class RelVisitor
Parameters:
rel - Node to visit
ordinal - Ordinal of node within its parent
parent - Parent of the node, or null if it is the root of the traversal