public abstract static class GenericUDAFComputeStats.GenericUDAFNumericStatsEvaluator<V,OI extends ObjectInspector> extends GenericUDAFEvaluator
Modifier and Type | Class and Description |
---|---|
class |
GenericUDAFComputeStats.GenericUDAFNumericStatsEvaluator.NumericStatsAgg |
GenericUDAFEvaluator.AbstractAggregationBuffer, GenericUDAFEvaluator.AggregationBuffer, GenericUDAFEvaluator.AggregationType, GenericUDAFEvaluator.Mode
Modifier and Type | Field and Description |
---|---|
protected StructField |
countNullsField |
protected LongObjectInspector |
countNullsFieldOI |
protected PrimitiveObjectInspector |
inputOI |
protected static int |
MAX_BIT_VECTORS |
protected StructField |
maxField |
protected OI |
maxFieldOI |
protected StructField |
minField |
protected OI |
minFieldOI |
protected StructField |
ndvField |
protected StringObjectInspector |
ndvFieldOI |
protected StructField |
numBitVectorsField |
protected IntObjectInspector |
numBitVectorsFieldOI |
protected PrimitiveObjectInspector |
numVectorsOI |
protected Object[] |
partialResult |
protected Object[] |
result |
protected StructObjectInspector |
soi |
protected boolean |
warned |
Constructor and Description |
---|
GenericUDAFComputeStats.GenericUDAFNumericStatsEvaluator() |
Modifier and Type | Method and Description |
---|---|
protected abstract OI |
getValueObjectInspector() |
ObjectInspector |
init(GenericUDAFEvaluator.Mode m,
ObjectInspector[] parameters)
Initialize the evaluator.
|
void |
iterate(GenericUDAFEvaluator.AggregationBuffer agg,
Object[] parameters)
Iterate through original data.
|
void |
merge(GenericUDAFEvaluator.AggregationBuffer agg,
Object partial)
Merge with partial aggregation result.
|
Object |
terminate(GenericUDAFEvaluator.AggregationBuffer agg)
Get final aggregation result.
|
Object |
terminatePartial(GenericUDAFEvaluator.AggregationBuffer agg)
Get partial aggregation result.
|
aggregate, close, configure, evaluate, getNewAggregationBuffer, getWindowingEvaluator, isEstimable, reset
protected static final int MAX_BIT_VECTORS
protected transient PrimitiveObjectInspector inputOI
protected transient PrimitiveObjectInspector numVectorsOI
protected transient StructObjectInspector soi
protected transient StructField minField
protected transient OI extends ObjectInspector minFieldOI
protected transient StructField maxField
protected transient OI extends ObjectInspector maxFieldOI
protected transient StructField countNullsField
protected transient LongObjectInspector countNullsFieldOI
protected transient StructField ndvField
protected transient StringObjectInspector ndvFieldOI
protected transient StructField numBitVectorsField
protected transient IntObjectInspector numBitVectorsFieldOI
protected transient Object[] partialResult
protected transient Object[] result
protected transient boolean warned
public GenericUDAFComputeStats.GenericUDAFNumericStatsEvaluator()
protected abstract OI getValueObjectInspector()
public ObjectInspector init(GenericUDAFEvaluator.Mode m, ObjectInspector[] parameters) throws HiveException
GenericUDAFEvaluator
init
in class GenericUDAFEvaluator
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).HiveException
public void iterate(GenericUDAFEvaluator.AggregationBuffer agg, Object[] parameters) throws HiveException
GenericUDAFEvaluator
iterate
in class GenericUDAFEvaluator
parameters
- The objects of parameters.HiveException
public Object terminatePartial(GenericUDAFEvaluator.AggregationBuffer agg) throws HiveException
GenericUDAFEvaluator
terminatePartial
in class GenericUDAFEvaluator
HiveException
public Object terminate(GenericUDAFEvaluator.AggregationBuffer agg) throws HiveException
GenericUDAFEvaluator
terminate
in class GenericUDAFEvaluator
HiveException
public void merge(GenericUDAFEvaluator.AggregationBuffer agg, Object partial) throws HiveException
GenericUDAFEvaluator
merge
in class GenericUDAFEvaluator
partial
- The partial aggregation result.HiveException
Copyright © 2017 The Apache Software Foundation. All rights reserved.