org.apache.hadoop.hive.ql.exec
Class DefaultUDAFEvaluatorResolver

java.lang.Object
  extended by 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.


Constructor Summary
DefaultUDAFEvaluatorResolver(Class<? extends UDAF> udafClass)
          Constructor.
 
Method Summary
 Class<? extends UDAFEvaluator> getEvaluatorClass(List<TypeInfo> argClasses)
          Gets the evaluator class for the UDAF given the parameter types.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultUDAFEvaluatorResolver

public DefaultUDAFEvaluatorResolver(Class<? extends UDAF> udafClass)
Constructor. This constructor sets the resolver to be used for comparison operators. See UDAFEvaluatorResolver

Method Detail

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.