org.apache.hadoop.hive.ql.udf.generic
Class AbstractGenericUDAFResolver
java.lang.Object
org.apache.hadoop.hive.ql.udf.generic.AbstractGenericUDAFResolver
- All Implemented Interfaces:
- GenericUDAFResolver, GenericUDAFResolver2
- Direct Known Subclasses:
- GenericUDAFAverage, GenericUDAFBridge, GenericUDAFCollectSet, GenericUDAFCorrelation, GenericUDAFCovariance, GenericUDAFHistogramNumeric, GenericUDAFMax, GenericUDAFMin, GenericUDAFSum, GenericUDAFVariance
public abstract class AbstractGenericUDAFResolver
- extends Object
- implements GenericUDAFResolver2
An abstract class to help facilitate existing implementations of
GenericUDAFResolver to migrate towards the newly introduced
interface GenericUDAFResolver2
. This class provides a default
implementation of this new API and in turn calls
the existing API GenericUDAFResolver.getEvaluator(TypeInfo[])
by
ignoring the extra parameter information available via the
GenericUDAFParameterInfo interface.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractGenericUDAFResolver
public AbstractGenericUDAFResolver()
getEvaluator
public GenericUDAFEvaluator getEvaluator(GenericUDAFParameterInfo info)
throws SemanticException
- Description copied from interface:
GenericUDAFResolver2
- Get the evaluator for the parameter types.
The reason that this function returns an object instead of a class is
because it is possible that the object needs some configuration (that can
be serialized). In that case the class of the object has to implement the
Serializable interface. At execution time, we will deserialize the object
from the plan and use it to evaluate the aggregations.
If the class of the object does not implement Serializable, then we will
create a new instance of the class at execution time.
- Specified by:
getEvaluator
in interface GenericUDAFResolver2
- Parameters:
info
- The parameter information that is applicable to the UDAF being
invoked.
- Throws:
SemanticException
Copyright © 2011 The Apache Software Foundation