public abstract static class GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<TYPE> extends GenericUDAFEvaluator
GenericUDAFEvaluator.AbstractAggregationBuffer, GenericUDAFEvaluator.AggregationBuffer, GenericUDAFEvaluator.AggregationType, GenericUDAFEvaluator.Mode| Modifier and Type | Field and Description |
|---|---|
protected boolean |
avgDistinct |
protected PrimitiveObjectInspector |
copiedOI |
protected PrimitiveObjectInspector |
inputOI |
protected boolean |
isWindowing |
protected Object[] |
partialResult |
protected ObjectInspector |
sumFieldOI |
partitionEvaluator| Constructor and Description |
|---|
AbstractGenericUDAFAverageEvaluator() |
aggregate, close, configure, createPartitionEvaluator, estimate, evaluate, getExprString, getNewAggregationBuffer, getPartitionWindowingEvaluator, getWindowingEvaluator, isEstimableprotected boolean isWindowing
protected boolean avgDistinct
protected transient PrimitiveObjectInspector inputOI
protected transient PrimitiveObjectInspector copiedOI
protected ObjectInspector sumFieldOI
protected transient Object[] partialResult
protected abstract ObjectInspector getSumFieldJavaObjectInspector()
protected abstract ObjectInspector getSumFieldWritableObjectInspector()
protected abstract void doIterate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<TYPE> aggregation, PrimitiveObjectInspector inputOI, Object parameter)
protected abstract void doMerge(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<TYPE> aggregation, Long partialCount, ObjectInspector sumFieldOI, Object partialSum)
protected abstract void doMergeAdd(TYPE sum, ObjectInspectorUtils.ObjectInspectorObject obj)
protected abstract void doTerminatePartial(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<TYPE> aggregation)
protected abstract Object doTerminate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<TYPE> aggregation)
protected abstract void doReset(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<TYPE> aggregation) throws HiveException
HiveExceptionpublic ObjectInspector init(GenericUDAFEvaluator.Mode m, ObjectInspector[] parameters) throws HiveException
GenericUDAFEvaluatorinit in class GenericUDAFEvaluatorm - 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).HiveExceptionpublic boolean isWindowingDistinct()
public void reset(GenericUDAFEvaluator.AggregationBuffer aggregation) throws HiveException
GenericUDAFEvaluatorreset in class GenericUDAFEvaluatorHiveExceptionpublic void iterate(GenericUDAFEvaluator.AggregationBuffer aggregation, Object[] parameters) throws HiveException
GenericUDAFEvaluatoriterate in class GenericUDAFEvaluatorparameters - The objects of parameters.HiveExceptionpublic Object terminatePartial(GenericUDAFEvaluator.AggregationBuffer aggregation) throws HiveException
GenericUDAFEvaluatorterminatePartial in class GenericUDAFEvaluatorHiveExceptionpublic void merge(GenericUDAFEvaluator.AggregationBuffer aggregation, Object partial) throws HiveException
GenericUDAFEvaluatormerge in class GenericUDAFEvaluatorpartial - The partial aggregation result.HiveExceptionpublic Object terminate(GenericUDAFEvaluator.AggregationBuffer aggregation) throws HiveException
GenericUDAFEvaluatorterminate in class GenericUDAFEvaluatorHiveExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.