org.apache.pig.newplan.logical.visitor
Class ProjectStarExpander

java.lang.Object
  extended by org.apache.pig.newplan.PlanVisitor
      extended by org.apache.pig.newplan.logical.relational.LogicalRelationalNodesVisitor
          extended by org.apache.pig.newplan.logical.visitor.ProjectStarExpander

public class ProjectStarExpander
extends LogicalRelationalNodesVisitor

A visitor to walk operators that contain a nested plan and translate project( * ) operators to a list of projection operators, i.e., project( * ) -> project(0), project(1), ... project(n-2), project(n-1) If input schema is null, project(*) is not expanded. It also expands project range ( eg $1 .. $5). It won't expand project-range-to-end (eg $3 ..) if the input schema is null.


Field Summary
 
Fields inherited from class org.apache.pig.newplan.PlanVisitor
currentWalker, DEFAULT_SCOPE, plan
 
Constructor Summary
ProjectStarExpander(OperatorPlan plan)
           
 
Method Summary
 void visit(LOCogroup cg)
           
 void visit(LOCube cu)
           
 void visit(LOForEach foreach)
           
 void visit(LOJoin join)
           
 void visit(LORank rank)
           
 void visit(LOSort sort)
           
 
Methods inherited from class org.apache.pig.newplan.logical.relational.LogicalRelationalNodesVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class org.apache.pig.newplan.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

ProjectStarExpander

public ProjectStarExpander(OperatorPlan plan)
                    throws FrontendException
Throws:
FrontendException
Method Detail

visit

public void visit(LOSort sort)
           throws FrontendException
Overrides:
visit in class LogicalRelationalNodesVisitor
Throws:
FrontendException

visit

public void visit(LORank rank)
           throws FrontendException
Overrides:
visit in class LogicalRelationalNodesVisitor
Throws:
FrontendException

visit

public void visit(LOCogroup cg)
           throws FrontendException
Overrides:
visit in class LogicalRelationalNodesVisitor
Throws:
FrontendException

visit

public void visit(LOCube cu)
           throws FrontendException
Overrides:
visit in class LogicalRelationalNodesVisitor
Throws:
FrontendException

visit

public void visit(LOJoin join)
           throws FrontendException
Overrides:
visit in class LogicalRelationalNodesVisitor
Throws:
FrontendException

visit

public void visit(LOForEach foreach)
           throws FrontendException
Overrides:
visit in class LogicalRelationalNodesVisitor
Throws:
FrontendException


Copyright © 2007-2012 The Apache Software Foundation