public static class GenericUDAFSum.GenericUDAFSumHiveDecimal extends GenericUDAFSum.GenericUDAFSumEvaluator<org.apache.hadoop.hive.serde2.io.HiveDecimalWritable>
GenericUDAFEvaluator.AbstractAggregationBuffer, GenericUDAFEvaluator.AggregationBuffer, GenericUDAFEvaluator.AggregationType, GenericUDAFEvaluator.ModeinputOI, isWindowing, outputOI, result, sumDistinctpartitionEvaluator| Constructor and Description |
|---|
GenericUDAFSumHiveDecimal() |
| Modifier and Type | Method and Description |
|---|---|
protected BasePartitionEvaluator |
createPartitionEvaluator(WindowFrameDef winFrame,
PTFPartition partition,
List<PTFExpressionDef> parameters,
ObjectInspector outputOI)
This class needs to be overridden by the child class to implement function
specific evaluator.
|
GenericUDAFEvaluator.AggregationBuffer |
getNewAggregationBuffer()
Get a new aggregation object.
|
static DecimalTypeInfo |
getOutputDecimalTypeInfoForSum(int inputPrecision,
int inputScale,
GenericUDAFEvaluator.Mode mode) |
GenericUDAFEvaluator |
getWindowingEvaluator(WindowFrameDef wFrameDef)
When evaluating an aggregates over a fixed Window, the naive way to compute
results is to compute the aggregate for each row.
|
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.
|
void |
reset(GenericUDAFEvaluator.AggregationBuffer agg)
Reset the aggregation.
|
Object |
terminate(GenericUDAFEvaluator.AggregationBuffer agg)
Get final aggregation result.
|
isEligibleValue, isWindowingDistinct, setSumDistinct, setWindowing, terminatePartialaggregate, close, configure, estimate, evaluate, getExprString, getPartitionWindowingEvaluator, isEstimablepublic 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 static DecimalTypeInfo getOutputDecimalTypeInfoForSum(int inputPrecision, int inputScale, GenericUDAFEvaluator.Mode mode)
public GenericUDAFEvaluator.AggregationBuffer getNewAggregationBuffer() throws HiveException
GenericUDAFEvaluatorgetNewAggregationBuffer in class GenericUDAFEvaluatorHiveExceptionpublic void reset(GenericUDAFEvaluator.AggregationBuffer agg) throws HiveException
GenericUDAFEvaluatorreset in class GenericUDAFEvaluatorHiveExceptionpublic void iterate(GenericUDAFEvaluator.AggregationBuffer agg, Object[] parameters) throws HiveException
GenericUDAFEvaluatoriterate in class GenericUDAFEvaluatorparameters - The objects of parameters.HiveExceptionpublic void merge(GenericUDAFEvaluator.AggregationBuffer agg, Object partial) throws HiveException
GenericUDAFEvaluatormerge in class GenericUDAFEvaluatorpartial - The partial aggregation result.HiveExceptionpublic Object terminate(GenericUDAFEvaluator.AggregationBuffer agg) throws HiveException
GenericUDAFEvaluatorterminate in class GenericUDAFEvaluatorHiveExceptionpublic GenericUDAFEvaluator getWindowingEvaluator(WindowFrameDef wFrameDef)
GenericUDAFEvaluatorThis 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 GenericUDAFEvaluatorwFrameDef - the Window definition in play for this evaluation.protected BasePartitionEvaluator createPartitionEvaluator(WindowFrameDef winFrame, PTFPartition partition, List<PTFExpressionDef> parameters, ObjectInspector outputOI)
GenericUDAFEvaluatorcreatePartitionEvaluator in class GenericUDAFEvaluatorCopyright © 2019 The Apache Software Foundation. All Rights Reserved.