org.apache.pig.impl.logicalLayer
Class PlanSetter

java.lang.Object
  extended by org.apache.pig.impl.plan.PlanVisitor<LogicalOperator,LogicalPlan>
      extended by org.apache.pig.impl.logicalLayer.LOVisitor
          extended by org.apache.pig.impl.logicalLayer.PlanSetter

public class PlanSetter
extends LOVisitor

A visitor to set plans correctly inside logical operators. When a logical operator is constructed, it is passed the plan value that is currently being used. However, once a single plan is stitched together, these references are no longer useful. However, there are a number of places that it is useful to be able to refer to the correct plan. So this visitor walks the final plan and sets the mCurrentWalker.getPlan() values in LogicalOperator appropriately. Note that some operators can be in multiple plans (such as inside a foreach). In this case the mCurrentWalker.getPlan() value will be for one of the plans. Which one is not guaranteed.


Field Summary
 
Fields inherited from class org.apache.pig.impl.plan.PlanVisitor
mCurrentWalker, mPlan
 
Constructor Summary
PlanSetter(LogicalPlan plan)
           
 
Method Summary
 void visit(LOAdd op)
           
 void visit(LOAnd op)
           
 void visit(LOBinCond op)
           
 void visit(LOCast op)
           
 void visit(LOCogroup op)
           
 void visit(LOConst op)
           
 void visit(LOCross op)
           
 void visit(LODistinct op)
           
 void visit(LODivide op)
           
 void visit(LOEqual op)
           
 void visit(LOFilter op)
           
 void visit(LOForEach op)
           
 void visit(LOGreaterThan op)
           
 void visit(LOGreaterThanEqual op)
           
 void visit(LOIsNull op)
           
 void visit(LOJoin op)
           
 void visit(LOLesserThan op)
           
 void visit(LOLesserThanEqual op)
           
 void visit(LOLimit op)
           
 void visit(LOLoad op)
           
 void visit(LOMapLookup op)
           
 void visit(LOMod op)
           
 void visit(LOMultiply op)
           
 void visit(LONegative op)
           
 void visit(LONot op)
           
 void visit(LONotEqual op)
           
 void visit(LOOr op)
           
 void visit(LOProject op)
           
 void visit(LORegexp op)
           
 void visit(LOSort op)
           
 void visit(LOSplit op)
           
 void visit(LOSplitOutput op)
           
 void visit(LOStore op)
           
 void visit(LOStream op)
           
 void visit(LOSubtract op)
           
 void visit(LOUnion op)
           
 void visit(LOUserFunc op)
          Iterate over each expression that is part of the function argument list
 
Methods inherited from class org.apache.pig.impl.logicalLayer.LOVisitor
visit, visit, visit, visit, visit
 
Methods inherited from class org.apache.pig.impl.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

PlanSetter

public PlanSetter(LogicalPlan plan)
Method Detail

visit

public void visit(LOAdd op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOAnd op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOBinCond op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Parameters:
op - the logical binCond operator that has to be visited
Throws:
VisitorException

visit

public void visit(LOCast op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Parameters:
op - the logical cast operator that has to be visited
Throws:
VisitorException

visit

public void visit(LOCogroup op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Parameters:
op - the logical cogroup operator that has to be visited
Throws:
VisitorException

visit

public void visit(LOJoin op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Parameters:
op - the logical join operator that has to be visited
Throws:
VisitorException

visit

public void visit(LOConst op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOCross op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LODistinct op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LODivide op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOEqual op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOFilter op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Parameters:
op - the logical filter operator that has to be visited
Throws:
VisitorException

visit

public void visit(LOForEach op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Parameters:
op - the logical foreach operator that has to be visited
Throws:
VisitorException

visit

public void visit(LOGreaterThan op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOGreaterThanEqual op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOIsNull op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOLesserThan op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOLesserThanEqual op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOLimit op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOLoad op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOMapLookup op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOMod op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOMultiply op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LONegative op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LONot op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LONotEqual op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOOr op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOProject op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LORegexp op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Parameters:
op - the logical regexp operator that has to be visited
Throws:
VisitorException

visit

public void visit(LOSort op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Parameters:
op - the logical sort operator that has to be visited
Throws:
VisitorException

visit

public void visit(LOSplit op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Parameters:
op - the logical split operator that has to be visited
Throws:
VisitorException

visit

public void visit(LOSplitOutput op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOStore op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOSubtract op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOUnion op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException

visit

public void visit(LOUserFunc op)
           throws VisitorException
Description copied from class: LOVisitor
Iterate over each expression that is part of the function argument list

Overrides:
visit in class LOVisitor
Parameters:
op - the user defined function
Throws:
VisitorException

visit

public void visit(LOStream op)
           throws VisitorException
Overrides:
visit in class LOVisitor
Throws:
VisitorException


Copyright © ${year} The Apache Software Foundation