org.apache.pig.impl.eval
Class FuncEvalSpec

java.lang.Object
  extended by org.apache.pig.impl.eval.EvalSpec
      extended by org.apache.pig.impl.eval.FuncEvalSpec
All Implemented Interfaces:
Serializable

public class FuncEvalSpec
extends EvalSpec

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.pig.impl.eval.EvalSpec
EvalSpec.UserComparator
 
Field Summary
 
Fields inherited from class org.apache.pig.impl.eval.EvalSpec
inner, properties
 
Constructor Summary
FuncEvalSpec(FunctionInstantiator fInstantiaor, String funcName, EvalSpec args)
           
 
Method Summary
 boolean combinable()
           
 EvalSpec getArgs()
           
 EvalFunc getFunc()
          Extend the default deserialization
 String getFuncName()
           
 List<String> getFuncs()
          Get the functions required by this spec
 Type getReturnType()
           
 void instantiateFunc(FunctionInstantiator instantiaor)
           
 boolean isAsynchronous()
          Some specs may be asynchronous, i.e., they return before completing the processing fully.
protected  Schema mapInputSchema(Schema schema)
          Given an input schema, determine the output schema of this spec as it operates on input tuples with the input schema.
 void resetFuncToFinal()
          This will replace the function to be called by this spec to be the final instance instead of the general instance.
 void resetFuncToInitial()
          This will replace the function to be called by this spec to be the initial instance instead of the general instance.
 void resetFuncToIntermediate()
          This will replace the function to be called by this spec to be the intermediate instance instead of the general instance.
 void setArgs(EvalSpec a)
           
protected  DataCollector setupDefaultPipe(Properties properties, DataCollector endOfPipe)
          set up a default data processing pipe for processing by this spec This pipe does not include unflattening/flattening at the end
 String toString()
           
 void visit(EvalSpecVisitor v)
           
 
Methods inherited from class org.apache.pig.impl.eval.EvalSpec
addSpec, copy, finish, getCombiner, getComparator, getComparatorName, getLineage, getOutputSchemaForPipe, getProperties, isFlattened, isInner, setComparatorName, setFlatten, setInner, setLineageTracer, setSchema, setupPipe, simpleEval
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FuncEvalSpec

public FuncEvalSpec(FunctionInstantiator fInstantiaor,
                    String funcName,
                    EvalSpec args)
             throws IOException
Throws:
IOException
Method Detail

instantiateFunc

public void instantiateFunc(FunctionInstantiator instantiaor)
                     throws IOException
Overrides:
instantiateFunc in class EvalSpec
Throws:
IOException

getFuncs

public List<String> getFuncs()
Description copied from class: EvalSpec
Get the functions required by this spec

Specified by:
getFuncs in class EvalSpec
Returns:

mapInputSchema

protected Schema mapInputSchema(Schema schema)
Description copied from class: EvalSpec
Given an input schema, determine the output schema of this spec as it operates on input tuples with the input schema.

Specified by:
mapInputSchema in class EvalSpec
Returns:

setupDefaultPipe

protected DataCollector setupDefaultPipe(Properties properties,
                                         DataCollector endOfPipe)
Description copied from class: EvalSpec
set up a default data processing pipe for processing by this spec This pipe does not include unflattening/flattening at the end

Specified by:
setupDefaultPipe in class EvalSpec
Parameters:
properties - properties for the pipe
endOfPipe - The collector where output is desired
Returns:
The collector where input tuples should be put

toString

public String toString()
Overrides:
toString in class Object

getFunc

public EvalFunc getFunc()
Extend the default deserialization

Parameters:
in -
Throws:
IOException
ClassNotFoundException

getReturnType

public Type getReturnType()

isAsynchronous

public boolean isAsynchronous()
Description copied from class: EvalSpec
Some specs may be asynchronous, i.e., they return before completing the processing fully. The default value is false, may be overridden to return true

Overrides:
isAsynchronous in class EvalSpec

visit

public void visit(EvalSpecVisitor v)
Specified by:
visit in class EvalSpec

getFuncName

public String getFuncName()

getArgs

public EvalSpec getArgs()

setArgs

public void setArgs(EvalSpec a)

resetFuncToInitial

public void resetFuncToInitial()
This will replace the function to be called by this spec to be the initial instance instead of the general instance. This should only be called if the function is algebraic. It will only change the funcName variable, not the func variable itself.


resetFuncToIntermediate

public void resetFuncToIntermediate()
This will replace the function to be called by this spec to be the intermediate instance instead of the general instance. This should only be called if the function is algebraic. It will only change the funcName variable, not the func variable itself.


resetFuncToFinal

public void resetFuncToFinal()
This will replace the function to be called by this spec to be the final instance instead of the general instance. This should only be called if the function is algebraic. It will only change the funcName variable, not the func variable itself.

Parameters:
finalTuplePos - position in the tuple handed to the final function that it should use.

combinable

public boolean combinable()


Copyright © ${year} The Apache Software Foundation