org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators
Class ConstantExpression
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
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.ConstantExpression
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<Operator>, Illustrable
public class ConstantExpression
- extends ExpressionOperator
This class implements a Constant of any type.
Its value can be set using the setValue method.
- See Also:
- Serialized Form
Fields inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
alias, dummyBag, dummyBool, dummyDateTime, dummyDBA, dummyDouble, dummyFloat, dummyInt, dummyLong, dummyMap, dummyString, dummyTuple, illustrator, input, inputAttached, inputs, lineageTracer, outputs, parentPlan, pigLogger, reporter, requestedParallelism, resultType |
Fields inherited from class org.apache.pig.impl.plan.Operator |
mKey |
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.ExpressionOperator |
accumChild, accumChild, accumChild, accumChild, accumChild, accumChild, accumChild, accumChild, accumChild, accumChild, accumChild, accumChild, containUDF, setIllustrator |
Methods inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator |
addOriginalLocation, addOriginalLocation, attachInput, cloneHelper, detachInput, getAlias, getAliasString, getDummy, getIllustrator, getInputs, getLogger, getNext, getOriginalLocations, getPigLogger, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, processInput, reset, setAccumEnd, setAccumStart, setAccumulative, setInputs, setParentPlan, setPigLogger, setReporter, setRequestedParallelism, setResultType |
ConstantExpression
public ConstantExpression(OperatorKey k)
ConstantExpression
public ConstantExpression(OperatorKey k,
int rp)
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.
- Overrides:
supportsMultipleOutputs
in class ExpressionOperator
- Returns:
- true if it does, otherwise false.
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 ExpressionOperator
- Parameters:
v
- Visitor to visit with.
- Throws:
VisitorException
- if the visitor has a problem.
getValue
public Object getValue()
setValue
public void setValue(Object value)
genericGetNext
protected Result genericGetNext(Object obj,
byte dataType)
throws ExecException
- Throws:
ExecException
getNext
public Result getNext(DataBag db)
throws ExecException
- Overrides:
getNext
in class ExpressionOperator
- Throws:
ExecException
getNext
public Result getNext(DataByteArray ba)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
getNext
public Result getNext(Double d)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
getNext
public Result getNext(Float f)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
getNext
public Result getNext(Integer i)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
getNext
public Result getNext(Long l)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
getNext
public Result getNext(org.joda.time.DateTime dt)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
getNext
public Result getNext(String s)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
getNext
public Result getNext(Tuple t)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
getNext
public Result getNext(Boolean b)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
getNext
public Result getNext(Map m)
throws ExecException
- Overrides:
getNext
in class PhysicalOperator
- Throws:
ExecException
clone
public ConstantExpression 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.
- Overrides:
clone
in class ExpressionOperator
- Throws:
CloneNotSupportedException
- See Also:
Do not use the clone method directly. Operators are cloned when logical plans
are cloned using {@link LogicalPlanCloner}
getChildExpressions
public List<ExpressionOperator> getChildExpressions()
- Get the child expressions of this expression
- Specified by:
getChildExpressions
in class ExpressionOperator
illustratorMarkup
public Tuple illustratorMarkup(Object in,
Object out,
int eqClassIndex)
- Description copied from interface:
Illustrable
- input tuple mark up to be illustrate-able
- Parameters:
in
- input tupleout
- output tuple before wrapped in ExampleTupleeqClassIndex
- index into equivalence classes in illustrator
- Returns:
- tuple
Copyright © 2007-2012 The Apache Software Foundation