org.apache.hadoop.hive.ql.udf.generic
Class GenericUDFUtils.StringHelper

java.lang.Object
  extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDFUtils.StringHelper
Enclosing class:
GenericUDFUtils

public static class GenericUDFUtils.StringHelper
extends Object

Helper class for UDFs returning string/varchar/char


Field Summary
protected  Object returnValue
           
protected  PrimitiveObjectInspector.PrimitiveCategory type
           
 
Constructor Summary
GenericUDFUtils.StringHelper(PrimitiveObjectInspector.PrimitiveCategory type)
           
 
Method Summary
static int getFixedStringSizeForType(PrimitiveObjectInspector poi)
          Helper function to help GenericUDFs determine the return type character length for char/varchar.
 Object setReturnValue(String val)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

returnValue

protected Object returnValue

type

protected PrimitiveObjectInspector.PrimitiveCategory type
Constructor Detail

GenericUDFUtils.StringHelper

public GenericUDFUtils.StringHelper(PrimitiveObjectInspector.PrimitiveCategory type)
                             throws UDFArgumentException
Throws:
UDFArgumentException
Method Detail

setReturnValue

public Object setReturnValue(String val)
                      throws UDFArgumentException
Throws:
UDFArgumentException

getFixedStringSizeForType

public static int getFixedStringSizeForType(PrimitiveObjectInspector poi)
                                     throws UDFArgumentException
Helper function to help GenericUDFs determine the return type character length for char/varchar.

Parameters:
poi - PrimitiveObjectInspector representing the type
Returns:
character length of the type
Throws:
UDFArgumentException


Copyright © 2012 The Apache Software Foundation