Class PORelationToExprProject

  extended by org.apache.pig.impl.plan.Operator<PhyPlanVisitor>
      extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
          extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.ExpressionOperator
              extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject
                  extended by org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.PORelationToExprProject
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Operator>, Illustrable

public class PORelationToExprProject
extends POProject

Implements a specialized form of POProject which is used *ONLY* in the following case: This project is Project(*) introduced after a relational operator to supply a bag as output (as an expression). This project is either providing the bag as input to a successor expression operator or is itself the leaf in a inner plan If the predecessor relational operator sends an EOP then send an empty bag first to signal "empty" output and then send an EOP NOTE: A Project(*) of return type BAG whose predecessor is from an outside plan (i.e. not in the same inner plan as the project) will NOT lead us here. So a query like: a = load 'baginp.txt' as (b:bag{t:tuple()}); b = foreach a generate $0; dump b; will go through a regular project (without the following flag)

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
Field Summary
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject
bagFactory, columns
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
alias, illustrator, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, requestedParallelism, res, resultType
Fields inherited from class org.apache.pig.impl.plan.Operator
Constructor Summary
PORelationToExprProject(OperatorKey k)
PORelationToExprProject(OperatorKey k, int rp)
PORelationToExprProject(OperatorKey k, int rp, ArrayList<Integer> cols)
PORelationToExprProject(OperatorKey k, int rp, int col)
Method Summary
 PORelationToExprProject clone()
          Make a deep copy of this operator.
 Result getNextDataBag()
 String name()
 void reset()
          Reset internal state in an operator.
 void visit(PhyPlanVisitor v)
          Visit this node with the provided visitor.
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject
attachInput, consumeInputBag, getChildExpressions, getColumn, getColumns, getNext, getNextBigDecimal, getNextBigInteger, getNextBoolean, getNextDataByteArray, getNextDateTime, getNextDouble, getNextFloat, getNextInteger, getNextLong, getNextMap, getNextString, getNextTuple, getStartCol, illustratorMarkup, isOverloaded, isProjectToEnd, isStar, processInputBag, setColumn, setColumns, setOverloaded, setProjectToEnd, setResultSingleTupleBag, setStar, supportsMultipleInputs, supportsMultipleOutputs
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.ExpressionOperator
accumChild, containUDF, setIllustrator, toString
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
addOriginalLocation, addOriginalLocation, cloneHelper, detachInput, getAlias, getAliasString, getIllustrator, getInputs, getLogger, getNext, getOriginalLocations, getPigLogger, getReporter, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, processInput, setAccumEnd, setAccumStart, setAccumulative, setInputs, setParentPlan, setPigLogger, setReporter, setRequestedParallelism, setResultType
Methods inherited from class org.apache.pig.impl.plan.Operator
compareTo, equals, getOperatorKey, getProjectionMap, hashCode, regenerateProjectionMap, rewire, unsetProjectionMap
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail


public PORelationToExprProject(OperatorKey k)


public PORelationToExprProject(OperatorKey k,
                               int rp)


public PORelationToExprProject(OperatorKey k,
                               int rp,
                               int col)


public PORelationToExprProject(OperatorKey k,
                               int rp,
                               ArrayList<Integer> cols)
Method Detail


public String name()
name in class POProject


public void visit(PhyPlanVisitor v)
           throws VisitorException
Description copied from class: Operator
Visit this node with the provided visitor. This should only be called by the visitor class itself, never directly.

visit in class POProject
v - Visitor to visit with.
VisitorException - if the visitor has a problem.


public void reset()
Description copied from class: PhysicalOperator
Reset internal state in an operator. For use in nested pipelines where operators like limit and sort may need to reset their state. Limit needs it because it needs to know it's seeing a fresh set of input. Blocking operators like sort and distinct need it because they may not have drained their previous input due to a limit and thus need to be told to drop their old input and start over.

reset in class PhysicalOperator


public Result getNextDataBag()
                      throws ExecException
getNextDataBag in class POProject


public PORelationToExprProject clone()
                              throws CloneNotSupportedException
Description copied from class: ExpressionOperator
Make a deep copy of this operator. This is declared here to make it possible to call clone on ExpressionOperators.

clone in class POProject
See Also:
Do not use the clone method directly. Operators are cloned when logical plans are cloned using {@link LogicalPlanCloner}

Copyright © 2007-2012 The Apache Software Foundation