org.apache.hadoop.hive.ql.exec
Interface UDFMethodResolver

All Known Implementing Classes:
ComparisonOpMethodResolver, DefaultUDFMethodResolver, NumericOpMethodResolver

public interface UDFMethodResolver

The UDF Method resolver interface. A user can plugin a resolver to their UDF by implementing the functions in this interface. Note that the resolver is stored in the UDF class as an instance variable. We did not use a static variable because many resolvers maintain the class of the enclosing UDF as state and are called from a base class e.g. UDFBaseCompare. This makes it very easy to write UDFs that want to do resolution similar to the comparison operators. Such UDFs just need to extend UDFBaseCompare and do not have to care about the UDFMethodResolver interface. Same is true for UDFs that want to do resolution similar to that done by the numeric operators. Such UDFs simply have to extend UDFBaseNumericOp class. For the default resolution the UDF implementation simply needs to extend the UDF class.


Method Summary
 Method getEvalMethod(List<TypeInfo> argClasses)
          Gets the evaluate method for the UDF given the parameter types.
 

Method Detail

getEvalMethod

Method getEvalMethod(List<TypeInfo> argClasses)
                     throws UDFArgumentException
Gets the evaluate method for the UDF given the parameter types.

Parameters:
argClasses - The list of the argument types that need to matched with the evaluate function signature.
Throws:
UDFArgumentException


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