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


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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 © 2014 The Apache Software Foundation. All rights reserved.