org.apache.hadoop.hive.ql.udf.generic
Class GenericUDAFPercentileApprox.GenericUDAFSinglePercentileApproxEvaluator

java.lang.Object
  extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
      extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
          extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox.GenericUDAFSinglePercentileApproxEvaluator
All Implemented Interfaces:
Closeable
Enclosing class:
GenericUDAFPercentileApprox

public static class GenericUDAFPercentileApprox.GenericUDAFSinglePercentileApproxEvaluator
extends GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
GenericUDAFEvaluator.AbstractAggregationBuffer, GenericUDAFEvaluator.AggregationBuffer, GenericUDAFEvaluator.AggregationType, GenericUDAFEvaluator.Mode
 
Constructor Summary
GenericUDAFPercentileApprox.GenericUDAFSinglePercentileApproxEvaluator()
           
 
Method Summary
 ObjectInspector init(GenericUDAFEvaluator.Mode m, ObjectInspector[] parameters)
          Initialize the evaluator.
 Object terminate(GenericUDAFEvaluator.AggregationBuffer agg)
          Get final aggregation result.
 
Methods inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
getNewAggregationBuffer, iterate, merge, reset, terminatePartial
 
Methods inherited from class org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
aggregate, close, configure, evaluate, isEstimable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericUDAFPercentileApprox.GenericUDAFSinglePercentileApproxEvaluator

public GenericUDAFPercentileApprox.GenericUDAFSinglePercentileApproxEvaluator()
Method Detail

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.