public static class GenericUDAFAverage.GenericUDAFAverageEvaluatorDecimal extends GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<HiveDecimal>
GenericUDAFEvaluator.AbstractAggregationBuffer, GenericUDAFEvaluator.AggregationBuffer, GenericUDAFEvaluator.AggregationType, GenericUDAFEvaluator.Mode
inputOI, partialResult, sumFieldOI
Constructor and Description |
---|
GenericUDAFAverage.GenericUDAFAverageEvaluatorDecimal() |
Modifier and Type | Method and Description |
---|---|
protected void |
doIterate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation,
PrimitiveObjectInspector oi,
Object parameter) |
protected void |
doMerge(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation,
Long partialCount,
ObjectInspector sumFieldOI,
Object partialSum) |
void |
doReset(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation) |
protected Object |
doTerminate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation) |
protected void |
doTerminatePartial(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation) |
GenericUDAFEvaluator.AggregationBuffer |
getNewAggregationBuffer()
Get a new aggregation object.
|
protected ObjectInspector |
getSumFieldJavaObjectInspector() |
protected ObjectInspector |
getSumFieldWritableObjectInspector() |
GenericUDAFEvaluator |
getWindowingEvaluator(WindowFrameDef wFrmDef)
When evaluating an aggregates over a fixed Window, the naive way to compute
results is to compute the aggregate for each row.
|
init, iterate, merge, reset, terminate, terminatePartial
aggregate, close, configure, evaluate, isEstimable
public GenericUDAFAverage.GenericUDAFAverageEvaluatorDecimal()
public void doReset(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation) throws HiveException
doReset
in class GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<HiveDecimal>
HiveException
protected ObjectInspector getSumFieldJavaObjectInspector()
getSumFieldJavaObjectInspector
in class GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<HiveDecimal>
protected ObjectInspector getSumFieldWritableObjectInspector()
getSumFieldWritableObjectInspector
in class GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<HiveDecimal>
protected void doIterate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation, PrimitiveObjectInspector oi, Object parameter)
doIterate
in class GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<HiveDecimal>
protected void doMerge(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation, Long partialCount, ObjectInspector sumFieldOI, Object partialSum)
doMerge
in class GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<HiveDecimal>
protected void doTerminatePartial(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation)
doTerminatePartial
in class GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<HiveDecimal>
protected Object doTerminate(org.apache.hadoop.hive.ql.udf.generic.GenericUDAFAverage.AverageAggregationBuffer<HiveDecimal> aggregation)
doTerminate
in class GenericUDAFAverage.AbstractGenericUDAFAverageEvaluator<HiveDecimal>
public GenericUDAFEvaluator.AggregationBuffer getNewAggregationBuffer() throws HiveException
GenericUDAFEvaluator
getNewAggregationBuffer
in class GenericUDAFEvaluator
HiveException
public GenericUDAFEvaluator getWindowingEvaluator(WindowFrameDef wFrmDef)
GenericUDAFEvaluator
This method is called after this Evaluator is initialized. The returned Function must be initialized. It is passed the 'window' of aggregation for each row.
getWindowingEvaluator
in class GenericUDAFEvaluator
wFrmDef
- the Window definition in play for this evaluation.Copyright © 2017 The Apache Software Foundation. All rights reserved.