org.apache.hadoop.hive.ql.exec
Interface UDAFEvaluatorResolver
- All Known Implementing Classes:
- DefaultUDAFEvaluatorResolver, NumericUDAFEvaluatorResolver
public interface UDAFEvaluatorResolver
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.
getEvaluatorClass
Class<? extends UDAFEvaluator> getEvaluatorClass(List<TypeInfo> argClasses)
throws UDFArgumentException
- Gets the evaluator class corresponding to the passed parameter list.
- Throws:
UDFArgumentException
Copyright © 2014 The Apache Software Foundation. All rights reserved.