org.apache.hadoop.hive.ql.udf.generic
Class GenericUDAFPercentileApprox.GenericUDAFMultiplePercentileApproxEvaluator
java.lang.Object
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox.GenericUDAFMultiplePercentileApproxEvaluator
- All Implemented Interfaces:
- Closeable
- Enclosing class:
- GenericUDAFPercentileApprox
public static class GenericUDAFPercentileApprox.GenericUDAFMultiplePercentileApproxEvaluator
- extends GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
GenericUDAFPercentileApprox.GenericUDAFMultiplePercentileApproxEvaluator
public GenericUDAFPercentileApprox.GenericUDAFMultiplePercentileApproxEvaluator()
init
public ObjectInspector init(GenericUDAFEvaluator.Mode m,
ObjectInspector[] parameters)
throws HiveException
- Description copied from class:
GenericUDAFEvaluator
- Initialize the evaluator.
- Overrides:
init
in class GenericUDAFEvaluator
- Parameters:
m
- The mode of aggregation.parameters
- The ObjectInspector for the parameters: In PARTIAL1 and COMPLETE
mode, the parameters are original data; In PARTIAL2 and FINAL
mode, the parameters are just partial aggregations (in that case,
the array will always have a single element).
- Returns:
- The ObjectInspector for the return value. In PARTIAL1 and PARTIAL2
mode, the ObjectInspector for the return value of
terminatePartial() call; In FINAL and COMPLETE mode, the
ObjectInspector for the return value of terminate() call.
NOTE: We need ObjectInspector[] (in addition to the TypeInfo[] in
GenericUDAFResolver) for 2 reasons: 1. ObjectInspector contains
more information than TypeInfo; and GenericUDAFEvaluator.init at
execution time. 2. We call GenericUDAFResolver.getEvaluator at
compilation time,
- Throws:
HiveException
terminate
public Object terminate(GenericUDAFEvaluator.AggregationBuffer agg)
throws HiveException
- Description copied from class:
GenericUDAFEvaluator
- Get final aggregation result.
- Specified by:
terminate
in class GenericUDAFEvaluator
- Returns:
- final aggregation result.
- Throws:
HiveException
Copyright © 2014 The Apache Software Foundation. All rights reserved.