org.apache.hadoop.hive.ql.udf.generic
Class GenericUDFToVarchar
java.lang.Object
org.apache.hadoop.hive.ql.udf.generic.GenericUDF
org.apache.hadoop.hive.ql.udf.generic.GenericUDFToVarchar
- All Implemented Interfaces:
- Closeable, Serializable, SettableUDF
public class GenericUDFToVarchar
- extends GenericUDF
- implements SettableUDF, Serializable
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericUDFToVarchar
public GenericUDFToVarchar()
initialize
public ObjectInspector initialize(ObjectInspector[] arguments)
throws UDFArgumentException
- Description copied from class:
GenericUDF
- Initialize this GenericUDF. This will be called once and only once per
GenericUDF instance.
- Specified by:
initialize
in class GenericUDF
- Parameters:
arguments
- The ObjectInspector for the arguments
- Returns:
- The ObjectInspector for the return value
- Throws:
UDFArgumentException
- Thrown when arguments have wrong types, wrong length, etc.
evaluate
public Object evaluate(GenericUDF.DeferredObject[] arguments)
throws HiveException
- Description copied from class:
GenericUDF
- Evaluate the GenericUDF with the arguments.
- Specified by:
evaluate
in class GenericUDF
- Parameters:
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.
- Returns:
- The
- Throws:
HiveException
getDisplayString
public String getDisplayString(String[] children)
- Description copied from class:
GenericUDF
- Get the String to be displayed in explain.
- Specified by:
getDisplayString
in class GenericUDF
setParams
public void setParams(Object typeParams)
throws UDFArgumentException
- Provide varchar type parameters for the output object inspector.
This should be done before the UDF is initialized.
- Specified by:
setParams
in interface SettableUDF
- Parameters:
typeParams
- UDF-specific data to add to the UDF
- Throws:
UDFArgumentException
getParams
public Object getParams()
- Specified by:
getParams
in interface SettableUDF
Copyright © 2012 The Apache Software Foundation