org.apache.hadoop.hive.ql.udf.generic
Class GenericUDAFStd
java.lang.Object
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFVariance
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFStd
- All Implemented Interfaces:
- GenericUDAFResolver
public class GenericUDAFStd
- extends GenericUDAFVariance
Compute the standard deviation by extending GenericUDAFVariance and
overriding the terminate() method of the evaluator.
Nested Class Summary |
static class |
GenericUDAFStd.GenericUDAFStdEvaluator
Compute the standard deviation by extending GenericUDAFVarianceEvaluator
and overriding the terminate() method of the evaluator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericUDAFStd
public GenericUDAFStd()
getEvaluator
public GenericUDAFEvaluator getEvaluator(TypeInfo[] parameters)
throws SemanticException
- Description copied from interface:
GenericUDAFResolver
- Get the evaluator for the parameter types.
The reason that this function returns an object instead of a class
is because it's 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 GenericUDAFResolver
- Overrides:
getEvaluator
in class GenericUDAFVariance
- Parameters:
parameters
- The types of the parameters. We need the type
information to know which evaluator class to use.
- Throws:
SemanticException
Copyright © 2009 The Apache Software Foundation