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