public class GenericUDFConcatWS extends GenericUDF
CONCAT_WS(sep, [string | array(string)]+).
This mimics the function from
MySQL http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#
function_concat-ws
GenericUDF
GenericUDF.DeferredJavaObject, GenericUDF.DeferredObject
Constructor and Description |
---|
GenericUDFConcatWS() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
evaluate(GenericUDF.DeferredObject[] arguments)
Evaluate the GenericUDF with the arguments.
|
java.lang.String |
getDisplayString(java.lang.String[] children)
Get the String to be displayed in explain.
|
ObjectInspector |
initialize(ObjectInspector[] arguments)
Initialize this GenericUDF.
|
protected boolean |
isStringOrVoidType(ObjectInspector oi) |
close, configure, getRequiredFiles, getRequiredJars, initializeAndFoldConstants
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.protected boolean isStringOrVoidType(ObjectInspector oi)
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
Copyright © 2012 The Apache Software Foundation