public class GenericUDFMacro extends GenericUDF implements java.io.Serializable
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject
Constructor and Description |
---|
GenericUDFMacro() |
GenericUDFMacro(java.lang.String macroName,
ExprNodeDesc bodyDesc,
java.util.List<java.lang.String> colNames,
java.util.List<TypeInfo> colTypes) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
evaluate(GenericUDF.DeferredObject[] arguments)
Evaluate the GenericUDF with the arguments.
|
ExprNodeDesc |
getBody() |
java.util.List<java.lang.String> |
getColNames() |
java.util.List<TypeInfo> |
getColTypes() |
java.lang.String |
getDisplayString(java.lang.String[] children)
Get the String to be displayed in explain.
|
java.lang.String |
getMacroName() |
ObjectInspector |
initialize(ObjectInspector[] arguments)
Initialize this GenericUDF.
|
boolean |
isDeterministic() |
boolean |
isStateful() |
void |
setBody(ExprNodeDesc bodyDesc) |
void |
setColNames(java.util.List<java.lang.String> colNames) |
void |
setColTypes(java.util.List<TypeInfo> colTypes) |
void |
setMacroName(java.lang.String macroName) |
close, configure, getRequiredFiles, getRequiredJars, initializeAndFoldConstants
public GenericUDFMacro(java.lang.String macroName, ExprNodeDesc bodyDesc, java.util.List<java.lang.String> colNames, java.util.List<TypeInfo> colTypes)
public GenericUDFMacro()
public boolean isDeterministic()
public boolean isStateful()
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 java.lang.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 java.lang.String getDisplayString(java.lang.String[] children)
GenericUDF
getDisplayString
in class GenericUDF
public void setMacroName(java.lang.String macroName)
public java.lang.String getMacroName()
public void setBody(ExprNodeDesc bodyDesc)
public ExprNodeDesc getBody()
public void setColNames(java.util.List<java.lang.String> colNames)
public java.util.List<java.lang.String> getColNames()
public void setColTypes(java.util.List<TypeInfo> colTypes)
public java.util.List<TypeInfo> getColTypes()
Copyright © 2012 The Apache Software Foundation