org.eigenbase.rel
Class RelVisitor

java.lang.Object
  extended by org.eigenbase.rel.RelVisitor
Direct Known Subclasses:
OJPreparingStmt.JavaRelFinder, RelDecorrelator.DecorrelateRelVisitor, RelOptUtil.VariableSetVisitor, RelStructuredTypeFlattener.RewriteRelVisitor, RelSubset.CheapestPlanReplacer, RelTraitPropagationVisitor, SqlToRelConverterTest.RelValidityChecker, TableAccessMap.TableRelVisitor, VisitorRelVisitor

public abstract class RelVisitor
extends Object

A RelVisitor is a Visitor role in the visitor pattern and visits RelNode objects as the role of Element. Other components in the pattern: RelNode.childrenAccept(RelVisitor).

Since:
22 September, 2001
Version:
$Id: //open/dev/farrago/src/org/eigenbase/rel/RelVisitor.java#10 $
Author:
jhyde

Field Summary
private  RelNode root
           
 
Constructor Summary
RelVisitor()
           
 
Method Summary
 RelNode go(RelNode p)
          Starts an iteration.
 void replaceRoot(RelNode node)
          Replaces the root node of this traversal.
 void visit(RelNode node, int ordinal, RelNode parent)
          Visits a node during a traversal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

private RelNode root
Constructor Detail

RelVisitor

public RelVisitor()
Method Detail

visit

public void visit(RelNode node,
                  int ordinal,
                  RelNode parent)
Visits a node during a traversal.

Parameters:
node - 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

replaceRoot

public void replaceRoot(RelNode node)
Replaces the root node of this traversal.

Parameters:
node - The new root node

go

public RelNode go(RelNode p)
Starts an iteration.