org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators
Class POForEach
java.lang.Object
org.apache.pig.impl.plan.Operator<PhyPlanVisitor>
org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<Operator>
- Direct Known Subclasses:
- POOptimizedForEach
public class POForEach
- extends PhysicalOperator
- See Also:
- Serialized Form
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
dummyBag, dummyBool, dummyDBA, dummyDouble, dummyFloat, dummyInt, dummyLong, dummyMap, dummyString, dummyTuple, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, reporter, requestedParallelism, res, resultType |
Fields inherited from class org.apache.pig.impl.plan.Operator |
mKey |
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
attachInput, cloneHelper, detachInput, getInputs, getLogger, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getNext, getPigLogger, getRequestedParallelism, getResultType, isBlocking, isInputAttached, processInput, reset, setInputs, setLineageTracer, setParentPlan, setPigLogger, setReporter, setRequestedParallelism, setResultType |
inputPlans
protected List<PhysicalPlan> inputPlans
opsToBeReset
protected List<PhysicalOperator> opsToBeReset
log
protected org.apache.commons.logging.Log log
mTupleFactory
protected static TupleFactory mTupleFactory
processingPlan
protected boolean processingPlan
its
protected Iterator<Tuple>[] its
bags
protected Object[] bags
data
protected Object[] data
resultTypes
protected byte[] resultTypes
isToBeFlattenedArray
protected boolean[] isToBeFlattenedArray
noItems
protected int noItems
planLeafOps
protected PhysicalOperator[] planLeafOps
POForEach
public POForEach(OperatorKey k)
POForEach
public POForEach(OperatorKey k,
int rp,
List inp)
POForEach
public POForEach(OperatorKey k,
int rp)
POForEach
public POForEach(OperatorKey k,
List inp)
POForEach
public POForEach(OperatorKey k,
int rp,
List<PhysicalPlan> inp,
List<Boolean> isToBeFlattened)
visit
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.
- Specified by:
visit
in class PhysicalOperator
- Parameters:
v
- Visitor to visit with.
- Throws:
VisitorException
- if the visitor has a problem.
name
public String name()
- Specified by:
name
in class Operator<PhyPlanVisitor>
supportsMultipleInputs
public boolean supportsMultipleInputs()
- Description copied from class:
Operator
- Indicates whether this operator supports multiple inputs.
- Specified by:
supportsMultipleInputs
in class Operator<PhyPlanVisitor>
- Returns:
- true if it does, otherwise false.
supportsMultipleOutputs
public boolean supportsMultipleOutputs()
- Description copied from class:
Operator
- Indicates whether this operator supports multiple outputs.
- Specified by:
supportsMultipleOutputs
in class Operator<PhyPlanVisitor>
- Returns:
- true if it does, otherwise false.
getNext
public Result getNext(Tuple t)
throws ExecException
- Calls getNext on the generate operator inside the nested
physical plan and returns it maintaining an additional state
to denote the begin and end of the nested plan processing.
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
processPlan
protected Result processPlan()
throws ExecException
- Throws:
ExecException
CreateTuple
protected Tuple CreateTuple(Object[] data)
throws ExecException
- Parameters:
data
- array that is the template for the final flattened tuple
- Returns:
- the final flattened tuple
- Throws:
ExecException
attachInputToPlans
protected void attachInputToPlans(Tuple t)
getLeaves
protected void getLeaves()
getInputPlans
public List<PhysicalPlan> getInputPlans()
setInputPlans
public void setInputPlans(List<PhysicalPlan> plans)
addInputPlan
public void addInputPlan(PhysicalPlan plan,
boolean flatten)
setToBeFlattened
public void setToBeFlattened(List<Boolean> flattens)
getToBeFlattened
public List<Boolean> getToBeFlattened()
clone
public POForEach clone()
throws CloneNotSupportedException
- Make a deep copy of this operator.
- Overrides:
clone
in class PhysicalOperator
- Throws:
CloneNotSupportedException
- See Also:
Do not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}
inProcessing
public boolean inProcessing()
setUpFlattens
protected void setUpFlattens(List<Boolean> isToBeFlattened)
getOpsToBeReset
public List<PhysicalOperator> getOpsToBeReset()
- Returns:
- the opsToBeReset
setOpsToBeReset
public void setOpsToBeReset(List<PhysicalOperator> opsToBeReset)
- Parameters:
opsToBeReset
- the opsToBeReset to set
Copyright © ${year} The Apache Software Foundation