org.apache.pig.piggybank.evaluation.math
Class DoubleBase

java.lang.Object
  extended by org.apache.pig.EvalFunc<Double>
      extended by org.apache.pig.piggybank.evaluation.math.Base
          extended by org.apache.pig.piggybank.evaluation.math.DoubleBase
Direct Known Subclasses:
ACOS, ASIN, ATAN, CBRT, CEIL, COS, COSH, EXP, EXPM1, FLOOR, LOG, LOG10, LOG1P, RINT, SIN, SINH, SQRT, TAN, TANH, toDegrees, toRadians

public abstract class DoubleBase
extends Base

base class for math udfs that return Double value


Field Summary
 
Fields inherited from class org.apache.pig.EvalFunc
log, pigLogger, reporter, returnType
 
Constructor Summary
DoubleBase()
           
 
Method Summary
 Double exec(Tuple input)
          java level API
 List<FuncSpec> getArgToFuncMapping()
           
 
Methods inherited from class org.apache.pig.piggybank.evaluation.math.Base
outputSchema
 
Methods inherited from class org.apache.pig.EvalFunc
finish, getLogger, getPigLogger, getReporter, getReturnType, getSchemaName, isAsynchronous, progress, setPigLogger, setReporter, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleBase

public DoubleBase()
Method Detail

exec

public Double exec(Tuple input)
            throws IOException
java level API

Specified by:
exec in class EvalFunc<Double>
Parameters:
input - expects a tuple with a single Double value
output - returns a Double value
Returns:
result, of type T.
Throws:
IOException

getArgToFuncMapping

public List<FuncSpec> getArgToFuncMapping()
                                   throws FrontendException
Overrides:
getArgToFuncMapping in class EvalFunc<Double>
Returns:
A List containing FuncSpec objects representing the Function class which can handle the inputs corresponding to the schema in the objects
Throws:
FrontendException


Copyright © ${year} The Apache Software Foundation