org.apache.hadoop.hive.ql.exec
Class DefaultUDAFEvaluatorResolver
java.lang.Object
org.apache.hadoop.hive.ql.exec.DefaultUDAFEvaluatorResolver
- All Implemented Interfaces:
- UDAFEvaluatorResolver
- Direct Known Subclasses:
- NumericUDAFEvaluatorResolver
public class DefaultUDAFEvaluatorResolver
- extends Object
- implements UDAFEvaluatorResolver
The default UDAF Method resolver. This resolver is used for resolving the
UDAF methods are used for partial and final 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.
DefaultUDAFEvaluatorResolver
public DefaultUDAFEvaluatorResolver(Class<? extends UDAF> udafClass)
- Constructor. This constructor sets the resolver to be used for comparison
operators. See
UDAFEvaluatorResolver
getEvaluatorClass
public Class<? extends UDAFEvaluator> getEvaluatorClass(List<TypeInfo> argClasses)
throws UDFArgumentException
- Gets the evaluator class for the UDAF given the parameter types.
- Specified by:
getEvaluatorClass
in interface UDAFEvaluatorResolver
- Parameters:
argClasses
- The list of the parameter types.
- Throws:
UDFArgumentException
Copyright © 2014 The Apache Software Foundation. All rights reserved.