|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.exec.FunctionRegistry
public class FunctionRegistry
Constructor Summary | |
---|---|
FunctionRegistry()
|
Method Summary | ||
---|---|---|
static Class<?> |
getCommonClass(Class<?> a,
Class<?> b)
Find a common class that objects of both Class a and Class b can convert to. |
|
static FunctionInfo |
getInfo(Class<?> fClass)
|
|
static Method |
getMethodInternal(ArrayList<Method> mlist,
boolean exact,
List<Class<?>> argumentClasses)
Gets the closest matching method corresponding to the argument list from a list of methods. |
|
static
|
getMethodInternal(Class<? extends T> udfClass,
String methodName,
boolean exact,
List<Class<?>> argumentClasses)
This method is shared between UDFRegistry and UDAFRegistry. |
|
static Class<? extends UDAF> |
getUDAF(String functionName)
|
|
static Method |
getUDAFEvaluateMethod(String name,
groupByDesc.Mode mode)
Returns the evaluate method for the UDAF based on the aggregation mode. |
|
static Class<? extends UDAFEvaluator> |
getUDAFEvaluator(String name,
List<Class<?>> argumentClasses)
Get the UDAF evaluator for the name and argumentClasses. |
|
static Method |
getUDAFMethod(String name,
Class<?>... argumentClasses)
Returns the "aggregate" method of the UDAF. |
|
static Method |
getUDAFMethod(String name,
List<Class<?>> argumentClasses)
Returns the "aggregate" method of the UDAF. |
|
static Class<? extends UDF> |
getUDFClass(String functionName)
|
|
static Method |
getUDFMethod(String name,
Class<?>... argumentClasses)
|
|
static Method |
getUDFMethod(String name,
List<Class<?>> argumentClasses)
Get the UDF method for the name and argumentClasses. |
|
static boolean |
implicitConvertable(Class<?> from,
Class<?> to)
Returns whether it is possible to implicitly convert an object of Class from to Class to. |
|
static Object |
invoke(Method m,
Object thisObject,
Object[] arguments)
|
|
static void |
registerUDAF(String functionName,
Class<? extends UDAF> UDAFClass)
|
|
static void |
registerUDF(String functionName,
Class<? extends UDF> UDFClass,
FunctionInfo.OperatorType opt,
boolean isOperator)
|
|
static void |
registerUDF(String functionName,
Class<? extends UDF> UDFClass,
FunctionInfo.OperatorType opt,
boolean isOperator,
String displayName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FunctionRegistry()
Method Detail |
---|
public static FunctionInfo getInfo(Class<?> fClass)
public static void registerUDF(String functionName, Class<? extends UDF> UDFClass, FunctionInfo.OperatorType opt, boolean isOperator)
public static void registerUDF(String functionName, Class<? extends UDF> UDFClass, FunctionInfo.OperatorType opt, boolean isOperator, String displayName)
public static Class<? extends UDF> getUDFClass(String functionName)
public static Class<?> getCommonClass(Class<?> a, Class<?> b)
public static boolean implicitConvertable(Class<?> from, Class<?> to)
public static Method getUDFMethod(String name, List<Class<?>> argumentClasses)
name
- the name of the UDFargumentClasses
-
public static Class<? extends UDAFEvaluator> getUDAFEvaluator(String name, List<Class<?>> argumentClasses)
name
- the name of the UDAFargumentClasses
-
public static <T> Method getMethodInternal(Class<? extends T> udfClass, String methodName, boolean exact, List<Class<?>> argumentClasses)
public static Method getUDFMethod(String name, Class<?>... argumentClasses)
public static void registerUDAF(String functionName, Class<? extends UDAF> UDAFClass)
public static Class<? extends UDAF> getUDAF(String functionName)
public static Method getUDAFMethod(String name, List<Class<?>> argumentClasses)
public static Method getUDAFEvaluateMethod(String name, groupByDesc.Mode mode)
name
- name of the UDAFmode
- the mode of the aggregation
public static Method getUDAFMethod(String name, Class<?>... argumentClasses)
public static Object invoke(Method m, Object thisObject, Object[] arguments) throws HiveException
HiveException
public static Method getMethodInternal(ArrayList<Method> mlist, boolean exact, List<Class<?>> argumentClasses)
mlist
- The list of methods to inspect.exact
- Boolean to indicate whether this is an exact match or not.argumentClasses
- The classes for the argument.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |