public class GenericUDFBridge extends GenericUDF implements Serializable
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject
Constructor and Description |
---|
GenericUDFBridge() |
GenericUDFBridge(String udfName,
boolean isOperator,
String udfClassName)
Create a new GenericUDFBridge object.
|
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.
|
String[] |
getRequiredFiles() |
String[] |
getRequiredJars()
The following two functions can be overridden to automatically include
additional resources required by this UDF.
|
Class<? extends UDF> |
getUdfClass() |
String |
getUdfClassName() |
String |
getUdfName() |
ObjectInspector |
initialize(ObjectInspector[] arguments)
Initialize this GenericUDF.
|
boolean |
isOperator() |
void |
setOperator(boolean isOperator) |
void |
setUdfClassName(String udfClassName) |
void |
setUdfName(String udfName) |
checkArgGroups, checkArgPrimitive, checkArgsSize, close, configure, copyToNewInstance, flip, getArgOrder, getConstantIntValue, getConstantLongValue, getConstantStringValue, getDateValue, getDoubleValue, getFuncName, getIntValue, getLongValue, getStandardDisplayString, getStandardDisplayString, getStringValue, getTimestampValue, initializeAndFoldConstants, negative, obtainDateConverter, obtainDoubleConverter, obtainIntConverter, obtainLongConverter, obtainStringConverter, obtainTimestampConverter
public GenericUDFBridge(String udfName, boolean isOperator, String udfClassName)
udfName
- The name of the corresponding udf.isOperator
- true for operatorsudfClassName
- java class name of UDFpublic GenericUDFBridge()
public void setUdfName(String udfName)
public String getUdfName()
getUdfName
in class GenericUDF
public String getUdfClassName()
public void setUdfClassName(String udfClassName)
public boolean isOperator()
public void setOperator(boolean isOperator)
public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException
GenericUDF
initialize
in class GenericUDF
arguments
- The ObjectInspector for the argumentsUDFArgumentException
- Thrown when arguments have wrong types, wrong length, etc.public Object evaluate(GenericUDF.DeferredObject[] arguments) throws HiveException
GenericUDF
evaluate
in class GenericUDF
arguments
- 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.HiveException
public String getDisplayString(String[] children)
GenericUDF
getDisplayString
in class GenericUDF
public String[] getRequiredJars()
GenericUDF
getRequiredJars
in class GenericUDF
public String[] getRequiredFiles()
getRequiredFiles
in class GenericUDF
Copyright © 2017 The Apache Software Foundation. All rights reserved.