public abstract class GenericUDFBaseArithmetic extends GenericUDFBaseBinary
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
ansiSqlArithmetic  | 
protected boolean | 
confLookupNeeded  | 
opDisplayName, opName| Constructor and Description | 
|---|
GenericUDFBaseArithmetic()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
copyToNewInstance(Object newInstance)
Some information may be set during initialize() which needs to be saved when the UDF is copied. 
 | 
Object | 
evaluate(GenericUDF.DeferredObject[] arguments)
Evaluate the GenericUDF with the arguments. 
 | 
ObjectInspector | 
initialize(ObjectInspector[] arguments)
Initialize this GenericUDF. 
 | 
protected abstract GenericUDF | 
instantiateDTIUDF()
Instantiate date-time/interval version of the arithmetic UDF 
 | 
protected abstract GenericUDFBaseNumeric | 
instantiateNumericUDF()
Instantiate numeric version of the arithmetic UDF 
 | 
getDisplayStringcheckArgGroups, checkArgPrimitive, checkArgsSize, close, configure, flip, getArgOrder, getConstantBooleanValue, getConstantIntValue, getConstantStringValue, getDateValue, getDoubleValue, getFuncName, getIntervalDayTimeValue, getIntervalYearMonthValue, getIntValue, getLongValue, getRequiredFiles, getRequiredJars, getStandardDisplayString, getStandardDisplayString, getStringValue, getTimestampValue, getUdfName, initializeAndFoldConstants, negative, obtainDateConverter, obtainDoubleConverter, obtainIntConverter, obtainLongConverter, obtainStringConverter, obtainTimestampConverterprotected boolean confLookupNeeded
protected boolean ansiSqlArithmetic
public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException
GenericUDFinitialize in class GenericUDFarguments - The ObjectInspector for the argumentsUDFArgumentException - Thrown when arguments have wrong types, wrong length, etc.public Object evaluate(GenericUDF.DeferredObject[] arguments) throws HiveException
GenericUDFevaluate in class GenericUDFarguments - The arguments as DeferedObject, use DeferedObject.get() to get the
          actual argument Object. The Objects can be inspected by the
          ObjectInspectors passed in the initialize call.HiveExceptionpublic void copyToNewInstance(Object newInstance) throws UDFArgumentException
GenericUDFcopyToNewInstance in class GenericUDFUDFArgumentExceptionprotected abstract GenericUDFBaseNumeric instantiateNumericUDF()
protected abstract GenericUDF instantiateDTIUDF()
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.