public class GenericUDFToDecimal extends GenericUDF implements SettableUDF
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject| Constructor and Description |
|---|
GenericUDFToDecimal() |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(GenericUDF.DeferredObject[] arguments)
Evaluate the GenericUDF with the arguments.
|
String |
getDisplayString(String[] children)
Get the String to be displayed in explain.
|
DecimalTypeInfo |
getTypeInfo() |
ObjectInspector |
initialize(ObjectInspector[] arguments)
Initialize this GenericUDF.
|
void |
setTypeInfo(DecimalTypeInfo typeInfo) |
void |
setTypeInfo(TypeInfo typeInfo)
Add data to UDF prior to initialization.
|
checkArgGroups, checkArgPrimitive, checkArgsSize, close, configure, copyToNewInstance, flip, getArgOrder, getConstantIntValue, getConstantLongValue, getConstantStringValue, getDateValue, getDoubleValue, getFuncName, getIntValue, getLongValue, getRequiredFiles, getRequiredJars, getStandardDisplayString, getStandardDisplayString, getStringValue, getTimestampValue, getUdfName, initializeAndFoldConstants, negative, obtainDateConverter, obtainDoubleConverter, obtainIntConverter, obtainLongConverter, obtainStringConverter, obtainTimestampConverterpublic 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 String getDisplayString(String[] children)
GenericUDFgetDisplayString in class GenericUDFpublic DecimalTypeInfo getTypeInfo()
getTypeInfo in interface SettableUDFpublic void setTypeInfo(DecimalTypeInfo typeInfo)
public void setTypeInfo(TypeInfo typeInfo) throws UDFArgumentException
SettableUDFsetTypeInfo in interface SettableUDFUDFArgumentExceptionCopyright © 2017 The Apache Software Foundation. All rights reserved.