|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pig.impl.plan.Operator<PhyPlanVisitor>
org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.ExpressionOperator
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject
public class POProject
Implements the overloaded form of the project operator. Projects the specified column from the input tuple. However, if asked for tuples when the input is a bag, the overloaded form is invoked and the project streams the tuples through instead of the bag.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
|---|
PhysicalOperator.OriginalLocation |
| Field Summary | |
|---|---|
protected static BagFactory |
bagFactory
|
protected ArrayList<Integer> |
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 |
|---|
mKey |
| Constructor Summary | |
|---|---|
POProject(OperatorKey k)
|
|
POProject(OperatorKey k,
int rp)
|
|
POProject(OperatorKey k,
int rp,
ArrayList<Integer> cols)
|
|
POProject(OperatorKey k,
int rp,
int col)
|
|
| Method Summary | |
|---|---|
void |
attachInput(Tuple t)
Overridden since the attachment of the new input should cause the old processing to end. |
POProject |
clone()
Make a deep copy of this operator. |
protected Result |
consumeInputBag(Result input)
|
List<ExpressionOperator> |
getChildExpressions()
Get the sub-expressions of this expression. |
int |
getColumn()
|
ArrayList<Integer> |
getColumns()
|
Result |
getNext()
Fetches the input tuple and returns the requested column |
Result |
getNextBigDecimal()
|
Result |
getNextBigInteger()
|
Result |
getNextBoolean()
|
Result |
getNextDataBag()
|
Result |
getNextDataByteArray()
|
Result |
getNextDateTime()
|
Result |
getNextDouble()
|
Result |
getNextFloat()
|
Result |
getNextInteger()
|
Result |
getNextLong()
|
Result |
getNextMap()
|
Result |
getNextString()
|
Result |
getNextTuple()
Asked for Tuples. |
int |
getStartCol()
|
Tuple |
illustratorMarkup(Object in,
Object out,
int eqClassIndex)
input tuple mark up to be illustrate-able |
boolean |
isOverloaded()
|
boolean |
isProjectToEnd()
|
boolean |
isStar()
|
String |
name()
|
protected Result |
processInputBag()
|
void |
setColumn(int col)
|
void |
setColumns(ArrayList<Integer> cols)
|
void |
setOverloaded(boolean overloaded)
|
void |
setProjectToEnd(int startCol)
|
void |
setResultSingleTupleBag(boolean resultSingleTupleBag)
|
void |
setStar(boolean star)
|
boolean |
supportsMultipleInputs()
Indicates whether this operator supports multiple inputs. |
boolean |
supportsMultipleOutputs()
Indicates whether this operator supports multiple outputs. |
void |
visit(PhyPlanVisitor v)
Visit this node with the provided visitor. |
| 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, reset, 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 |
| Field Detail |
|---|
protected static final BagFactory bagFactory
protected ArrayList<Integer> columns
| Constructor Detail |
|---|
public POProject(OperatorKey k)
public POProject(OperatorKey k,
int rp)
public POProject(OperatorKey k,
int rp,
int col)
public POProject(OperatorKey k,
int rp,
ArrayList<Integer> cols)
| Method Detail |
|---|
public void setProjectToEnd(int startCol)
public String name()
name in class Operator<PhyPlanVisitor>public boolean supportsMultipleInputs()
Operator
supportsMultipleInputs in class Operator<PhyPlanVisitor>public boolean supportsMultipleOutputs()
Operator
supportsMultipleOutputs in class ExpressionOperator
public void visit(PhyPlanVisitor v)
throws VisitorException
Operator
visit in class ExpressionOperatorv - Visitor to visit with.
VisitorException - if the visitor has a problem.public void attachInput(Tuple t)
attachInput in class PhysicalOperatort - -
The tuple that should be used as input
public Result getNext()
throws ExecException
ExecException
public Result getNextDataBag()
throws ExecException
getNextDataBag in class ExpressionOperatorExecException
protected Result consumeInputBag(Result input)
throws ExecException
input -
ExecException
public Result getNextDataByteArray()
throws ExecException
getNextDataByteArray in class PhysicalOperatorExecException
public Result getNextDouble()
throws ExecException
getNextDouble in class PhysicalOperatorExecException
public Result getNextFloat()
throws ExecException
getNextFloat in class PhysicalOperatorExecException
public Result getNextInteger()
throws ExecException
getNextInteger in class PhysicalOperatorExecException
public Result getNextLong()
throws ExecException
getNextLong in class PhysicalOperatorExecException
public Result getNextBoolean()
throws ExecException
getNextBoolean in class PhysicalOperatorExecException
public Result getNextDateTime()
throws ExecException
getNextDateTime in class PhysicalOperatorExecException
public Result getNextMap()
throws ExecException
getNextMap in class PhysicalOperatorExecException
public Result getNextString()
throws ExecException
getNextString in class PhysicalOperatorExecException
public Result getNextBigInteger()
throws ExecException
getNextBigInteger in class PhysicalOperatorExecException
public Result getNextBigDecimal()
throws ExecException
getNextBigDecimal in class PhysicalOperatorExecException
public Result getNextTuple()
throws ExecException
getNextTuple in class PhysicalOperatorExecExceptionpublic ArrayList<Integer> getColumns()
public int getColumn()
throws ExecException
ExecExceptionpublic int getStartCol()
public void setColumns(ArrayList<Integer> cols)
public void setColumn(int col)
public boolean isOverloaded()
public void setOverloaded(boolean overloaded)
public boolean isStar()
public boolean isProjectToEnd()
public void setStar(boolean star)
public POProject clone()
throws CloneNotSupportedException
ExpressionOperator
clone in class ExpressionOperatorCloneNotSupportedExceptionDo not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}
protected Result processInputBag()
throws ExecException
ExecExceptionpublic void setResultSingleTupleBag(boolean resultSingleTupleBag)
public List<ExpressionOperator> getChildExpressions()
ExpressionOperator
getChildExpressions in class ExpressionOperator
public Tuple illustratorMarkup(Object in,
Object out,
int eqClassIndex)
Illustrable
in - input tupleout - output tuple before wrapped in ExampleTupleeqClassIndex - index into equivalence classes in illustrator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||