org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators
Class POUserFunc

java.lang.Object
  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.POUserFunc
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Operator>, Illustrable

public class POUserFunc
extends ExpressionOperator

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator
PhysicalOperator.OriginalLocation
 
Field Summary
static byte FINAL
           
static byte INITIAL
           
static byte INTERMEDIATE
           
 
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
POUserFunc(OperatorKey k, int rp, List<PhysicalOperator> inp)
           
POUserFunc(OperatorKey k, int rp, List<PhysicalOperator> inp, FuncSpec funcSpec)
           
POUserFunc(OperatorKey k, int rp, List<PhysicalOperator> inp, FuncSpec funcSpec, EvalFunc func)
           
 
Method Summary
 POUserFunc clone()
          Make a deep copy of this operator.
 boolean combinable()
           
 void finish()
           
 String[] getCacheFiles()
           
 List<ExpressionOperator> getChildExpressions()
          Get child expression of this expression
 String getFinal()
           
 EvalFunc getFunc()
           
 FuncSpec getFuncSpec()
           
 String getInitial()
           
 String getIntermed()
           
 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()
           
 PhysicalOperator getReferencedOperator()
           
 Type getReturnType()
           
 Tuple illustratorMarkup(Object in, Object out, int eqClassIndex)
          input tuple mark up to be illustrate-able
 Boolean isAsynchronous()
           
 String name()
           
 Schema outputSchema(Schema input)
           
 Result processInput()
          A generic method for parsing input that either returns the attached input if it exists or fetches it from its predecessor.
 void setAccumStart()
           
 void setAlgebraicFunction(byte Function)
           
 void setCacheFiles(String[] cf)
           
 void setFuncInputSchema(String signature)
          Sets EvalFunc's inputschema based on the signature
 void setReferencedOperator(PhysicalOperator referencedOperator)
           
 void setResultType(byte resultType)
           
 void setSignature(String signature)
           
 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, attachInput, cloneHelper, detachInput, getAlias, getAliasString, getIllustrator, getInputs, getLogger, getNext, getOriginalLocations, getPigLogger, getReporter, getRequestedParallelism, getResultType, isAccumStarted, isAccumulative, isBlocking, isInputAttached, reset, setAccumEnd, setAccumulative, setInputs, setParentPlan, setPigLogger, setReporter, setRequestedParallelism
 
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

INITIAL

public static final byte INITIAL
See Also:
Constant Field Values

INTERMEDIATE

public static final byte INTERMEDIATE
See Also:
Constant Field Values

FINAL

public static final byte FINAL
See Also:
Constant Field Values
Constructor Detail

POUserFunc

public POUserFunc(OperatorKey k,
                  int rp,
                  List<PhysicalOperator> inp)

POUserFunc

public POUserFunc(OperatorKey k,
                  int rp,
                  List<PhysicalOperator> inp,
                  FuncSpec funcSpec)

POUserFunc

public POUserFunc(OperatorKey k,
                  int rp,
                  List<PhysicalOperator> inp,
                  FuncSpec funcSpec,
                  EvalFunc func)
Method Detail

getReferencedOperator

public PhysicalOperator getReferencedOperator()

setReferencedOperator

public void setReferencedOperator(PhysicalOperator referencedOperator)

processInput

public Result processInput()
                    throws ExecException
Description copied from class: PhysicalOperator
A generic method for parsing input that either returns the attached input if it exists or fetches it from its predecessor. If special processing is required, this method should be overridden.

Overrides:
processInput in class PhysicalOperator
Returns:
The Result object that results from processing the input
Throws:
ExecException

getNextTuple

public Result getNextTuple()
                    throws ExecException
Overrides:
getNextTuple in class PhysicalOperator
Throws:
ExecException

getNextDataBag

public Result getNextDataBag()
                      throws ExecException
Overrides:
getNextDataBag in class ExpressionOperator
Throws:
ExecException

getNextInteger

public Result getNextInteger()
                      throws ExecException
Overrides:
getNextInteger in class PhysicalOperator
Throws:
ExecException

getNextBoolean

public Result getNextBoolean()
                      throws ExecException
Overrides:
getNextBoolean in class PhysicalOperator
Throws:
ExecException

getNextDataByteArray

public Result getNextDataByteArray()
                            throws ExecException
Overrides:
getNextDataByteArray in class PhysicalOperator
Throws:
ExecException

getNextDouble

public Result getNextDouble()
                     throws ExecException
Overrides:
getNextDouble in class PhysicalOperator
Throws:
ExecException

getNextBigInteger

public Result getNextBigInteger()
                         throws ExecException
Overrides:
getNextBigInteger in class PhysicalOperator
Throws:
ExecException

getNextBigDecimal

public Result getNextBigDecimal()
                         throws ExecException
Overrides:
getNextBigDecimal in class PhysicalOperator
Throws:
ExecException

getNextFloat

public Result getNextFloat()
                    throws ExecException
Overrides:
getNextFloat in class PhysicalOperator
Throws:
ExecException

getNextLong

public Result getNextLong()
                   throws ExecException
Overrides:
getNextLong in class PhysicalOperator
Throws:
ExecException

getNextDateTime

public Result getNextDateTime()
                       throws ExecException
Overrides:
getNextDateTime in class PhysicalOperator
Throws:
ExecException

getNextMap

public Result getNextMap()
                  throws ExecException
Overrides:
getNextMap in class PhysicalOperator
Throws:
ExecException

getNextString

public Result getNextString()
                     throws ExecException
Overrides:
getNextString in class PhysicalOperator
Throws:
ExecException

setAlgebraicFunction

public void setAlgebraicFunction(byte Function)
                          throws ExecException
Throws:
ExecException

getInitial

public String getInitial()
                  throws ExecException
Throws:
ExecException

getIntermed

public String getIntermed()
                   throws ExecException
Throws:
ExecException

getFinal

public String getFinal()
                throws ExecException
Throws:
ExecException

getReturnType

public Type getReturnType()

finish

public void finish()

outputSchema

public Schema outputSchema(Schema input)

isAsynchronous

public Boolean isAsynchronous()

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.

getFuncSpec

public FuncSpec getFuncSpec()

getCacheFiles

public String[] getCacheFiles()

setCacheFiles

public void setCacheFiles(String[] cf)

combinable

public boolean combinable()

clone

public POUserFunc 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 child expression of this expression

Specified by:
getChildExpressions in class ExpressionOperator

setAccumStart

public void setAccumStart()
Overrides:
setAccumStart in class PhysicalOperator

setResultType

public void setResultType(byte resultType)
Overrides:
setResultType in class PhysicalOperator

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 tuple
out - output tuple before wrapped in ExampleTuple
eqClassIndex - index into equivalence classes in illustrator
Returns:
tuple

getFunc

public EvalFunc getFunc()

setSignature

public void setSignature(String signature)

setFuncInputSchema

public void setFuncInputSchema(String signature)
Sets EvalFunc's inputschema based on the signature

Parameters:
signature -


Copyright © 2007-2012 The Apache Software Foundation