org.apache.pig.experimental.logical.optimizer
Class AllSameVisitor

java.lang.Object
  extended by org.apache.pig.experimental.plan.PlanVisitor
      extended by org.apache.pig.experimental.logical.relational.LogicalPlanVisitor
          extended by org.apache.pig.experimental.logical.optimizer.AllSameVisitor

public abstract class AllSameVisitor
extends LogicalPlanVisitor

A visitor that walks the logical plan and calls the same method on every type of node. Subclasses can extend this and implement the execute method, and this method will be called on every node in the graph.


Field Summary
 
Fields inherited from class org.apache.pig.experimental.plan.PlanVisitor
currentWalker, DEFAULT_SCOPE, plan
 
Constructor Summary
AllSameVisitor(OperatorPlan plan, PlanWalker walker)
           
 
Method Summary
protected abstract  void execute(LogicalRelationalOperator op)
          Method to call on every node in the logical plan.
 void visitLOCogroup(LOCogroup cg)
           
 void visitLOFilter(LOFilter filter)
           
 void visitLOForEach(LOForEach foreach)
           
 void visitLOJoin(LOJoin join)
           
 void visitLOLoad(LOLoad load)
           
 void visitLOSplit(LOSplit split)
           
 void visitLOSplitOutput(LOSplitOutput splitOutput)
           
 void visitLOStore(LOStore store)
           
 void visitLOUnion(LOUnion union)
           
 
Methods inherited from class org.apache.pig.experimental.logical.relational.LogicalPlanVisitor
visitLOGenerate, visitLOInnerLoad
 
Methods inherited from class org.apache.pig.experimental.plan.PlanVisitor
getPlan, popWalker, pushWalker, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllSameVisitor

public AllSameVisitor(OperatorPlan plan,
                      PlanWalker walker)
Parameters:
plan - OperatorPlan to visit
walker - Walker to use to visit the plan
Method Detail

execute

protected abstract void execute(LogicalRelationalOperator op)
                         throws IOException
Method to call on every node in the logical plan.

Parameters:
op - Node that is currently being visited.
Throws:
IOException

visitLOFilter

public void visitLOFilter(LOFilter filter)
                   throws IOException
Overrides:
visitLOFilter in class LogicalPlanVisitor
Throws:
IOException

visitLOJoin

public void visitLOJoin(LOJoin join)
                 throws IOException
Overrides:
visitLOJoin in class LogicalPlanVisitor
Throws:
IOException

visitLOCogroup

public void visitLOCogroup(LOCogroup cg)
                    throws IOException
Overrides:
visitLOCogroup in class LogicalPlanVisitor
Throws:
IOException

visitLOLoad

public void visitLOLoad(LOLoad load)
                 throws IOException
Overrides:
visitLOLoad in class LogicalPlanVisitor
Throws:
IOException

visitLOStore

public void visitLOStore(LOStore store)
                  throws IOException
Overrides:
visitLOStore in class LogicalPlanVisitor
Throws:
IOException

visitLOForEach

public void visitLOForEach(LOForEach foreach)
                    throws IOException
Overrides:
visitLOForEach in class LogicalPlanVisitor
Throws:
IOException

visitLOSplit

public void visitLOSplit(LOSplit split)
                  throws IOException
Overrides:
visitLOSplit in class LogicalPlanVisitor
Throws:
IOException

visitLOSplitOutput

public void visitLOSplitOutput(LOSplitOutput splitOutput)
                        throws IOException
Overrides:
visitLOSplitOutput in class LogicalPlanVisitor
Throws:
IOException

visitLOUnion

public void visitLOUnion(LOUnion union)
                  throws IOException
Overrides:
visitLOUnion in class LogicalPlanVisitor
Throws:
IOException


Copyright © ${year} The Apache Software Foundation