org.apache.hadoop.hive.ql.exec
Class DefaultUDFMethodResolver
java.lang.Object
org.apache.hadoop.hive.ql.exec.DefaultUDFMethodResolver
- All Implemented Interfaces:
- UDFMethodResolver
public class DefaultUDFMethodResolver
- extends Object
- implements UDFMethodResolver
The default UDF Method resolver. This resolver is used for resolving the UDF
method that is to be used for evaluation given the list of the argument
types. The getEvalMethod goes through all the evaluate methods and returns
the one that matches the argument signature or is the closest match. Closest
match is defined as the one that requires the least number of arguments to be
converted. In case more than one matches are found, the method throws an
ambiguous method exception.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultUDFMethodResolver
public DefaultUDFMethodResolver(Class<? extends UDF> udfClass)
- Constructor. This constructor sets the resolver to be used for comparison
operators. See
UDFMethodResolver
getEvalMethod
public Method getEvalMethod(List<TypeInfo> argClasses)
throws UDFArgumentException
- Gets the evaluate method for the UDF given the parameter types.
- Specified by:
getEvalMethod
in interface UDFMethodResolver
- Parameters:
argClasses
- The list of the argument types that need to matched with the
evaluate function signature.
- Throws:
UDFArgumentException
Copyright © 2013 The Apache Software Foundation