org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators
Class ExpressionOperator
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.expressionOperators.ExpressionOperator
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<Operator>, Illustrable
- Direct Known Subclasses:
- BinaryExpressionOperator, ConstantExpression, POBinCond, POCast, POMapLookUp, POProject, POUserComparisonFunc, POUserFunc, UnaryExpressionOperator
public abstract class ExpressionOperator
- extends PhysicalOperator
A base class for all types of expressions. All expression
operators must extend this class.
- See Also:
- Serialized Form
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 |
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
addOriginalLocation, addOriginalLocation, attachInput, cloneHelper, detachInput, getAlias, getAliasString, getIllustrator, getInputs, getLogger, getNext, getNextBigDecimal, getNextBigInteger, getNextBoolean, getNextDataByteArray, getNextDateTime, getNextDouble, getNextFloat, getNextInteger, getNextLong, getNextMap, getNextString, getNextTuple, getOriginalLocations, getPigLogger, getReporter, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, processInput, reset, setAccumEnd, setAccumStart, setAccumulative, setInputs, setParentPlan, setPigLogger, setReporter, setRequestedParallelism, setResultType |
ExpressionOperator
public ExpressionOperator(OperatorKey k)
ExpressionOperator
public ExpressionOperator(OperatorKey k,
int rp)
setIllustrator
public void setIllustrator(Illustrator illustrator)
- Specified by:
setIllustrator
in interface Illustrable
- Overrides:
setIllustrator
in class PhysicalOperator
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.
getNextDataBag
public Result getNextDataBag()
throws ExecException
- Overrides:
getNextDataBag
in class PhysicalOperator
- Throws:
ExecException
visit
public abstract 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.
clone
public ExpressionOperator clone()
throws CloneNotSupportedException
- Make a deep copy of this operator. This is declared here to make it
possible to call clone on ExpressionOperators.
- 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}
getChildExpressions
protected abstract List<ExpressionOperator> getChildExpressions()
- Get the sub-expressions of this expression.
This is called if reducer is run as accumulative mode, all the child
expression must be called if they have any UDF to drive the UDF.accumulate()
containUDF
public boolean containUDF()
- check whether this expression contains any UDF
this is called if reducer is run as accumulative mode
in this case, all UDFs must be called
accumChild
protected Result accumChild(List<ExpressionOperator> child,
byte dataType)
throws ExecException
- Drive all the UDFs in accumulative mode
- Throws:
ExecException
toString
public String toString()
- Overrides:
toString
in class Operator<PhyPlanVisitor>
Copyright © 2007-2012 The Apache Software Foundation