org.apache.hadoop.hive.ql.exec
Class FunctionUtils

java.lang.Object
  extended by org.apache.hadoop.hive.ql.exec.FunctionUtils

public class FunctionUtils
extends Object


Nested Class Summary
static class FunctionUtils.FunctionType
          Function type, for permanent functions.
static class FunctionUtils.UDFClassType
          Enum type to describe what kind of UDF implementation class
 
Constructor Summary
FunctionUtils()
           
 
Method Summary
static String[] getQualifiedFunctionNameParts(String name)
           
static FunctionUtils.UDFClassType getUDFClassType(Class<?> udfClass)
          Determine the UDF class type of the class
static boolean isQualifiedFunctionName(String functionName)
           
static String qualifyFunctionName(String functionName, String dbName)
           
static String[] splitQualifiedFunctionName(String functionName)
          Splits a qualified function name into an array containing the database name and function name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionUtils

public FunctionUtils()
Method Detail

isQualifiedFunctionName

public static boolean isQualifiedFunctionName(String functionName)

qualifyFunctionName

public static String qualifyFunctionName(String functionName,
                                         String dbName)

splitQualifiedFunctionName

public static String[] splitQualifiedFunctionName(String functionName)
                                           throws HiveException
Splits a qualified function name into an array containing the database name and function name. If the name is not qualified, the database name is null. If there is more than one '.', an exception will be thrown.

Parameters:
functionName - Function name, which may or may not be qualified
Returns:
Throws:
HiveException

getQualifiedFunctionNameParts

public static String[] getQualifiedFunctionNameParts(String name)
                                              throws HiveException
Throws:
HiveException

getUDFClassType

public static FunctionUtils.UDFClassType getUDFClassType(Class<?> udfClass)
Determine the UDF class type of the class

Parameters:
udfClass -
Returns:
UDFClassType enum corresponding to the class type of the UDF


Copyright © 2014 The Apache Software Foundation. All rights reserved.