org.apache.hadoop.hive.ql.udf.generic
Class GenericUDAFCumeDist.GenericUDAFCumeDistEvaluator

java.lang.Object
  extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
      extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDAFRank.GenericUDAFRankEvaluator
          extended by org.apache.hadoop.hive.ql.udf.generic.GenericUDAFCumeDist.GenericUDAFCumeDistEvaluator
All Implemented Interfaces:
Closeable
Enclosing class:
GenericUDAFCumeDist

public static class GenericUDAFCumeDist.GenericUDAFCumeDistEvaluator
extends GenericUDAFRank.GenericUDAFRankEvaluator


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
GenericUDAFCumeDist.GenericUDAFCumeDistEvaluator()
           
 
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.GenericUDAFRank.GenericUDAFRankEvaluator
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

GenericUDAFCumeDist.GenericUDAFCumeDistEvaluator

public GenericUDAFCumeDist.GenericUDAFCumeDistEvaluator()
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 GenericUDAFRank.GenericUDAFRankEvaluator
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.

Overrides:
terminate in class GenericUDAFRank.GenericUDAFRankEvaluator
Returns:
final aggregation result.
Throws:
HiveException


Copyright © 2014 The Apache Software Foundation. All rights reserved.