org.apache.hadoop.hive.ql.udf.generic
Class GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
java.lang.Object
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFEvaluator
org.apache.hadoop.hive.ql.udf.generic.GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
- Direct Known Subclasses:
- GenericUDAFPercentileApprox.GenericUDAFMultiplePercentileApproxEvaluator, GenericUDAFPercentileApprox.GenericUDAFSinglePercentileApproxEvaluator
- Enclosing class:
- GenericUDAFPercentileApprox
public abstract static class GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
- extends GenericUDAFEvaluator
Construct a histogram using the algorithm described by Ben-Haim and Tom-Tov, and then
use it to compute an approximate percentile value.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
inputOI
protected PrimitiveObjectInspector inputOI
quantiles
protected double[] quantiles
nbins
protected Integer nbins
loi
protected StandardListObjectInspector loi
GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator
public GenericUDAFPercentileApprox.GenericUDAFPercentileApproxEvaluator()
merge
public void merge(GenericUDAFEvaluator.AggregationBuffer agg,
Object partial)
throws HiveException
- Description copied from class:
GenericUDAFEvaluator
- Merge with partial aggregation result. NOTE: null might be passed in case
there is no input data.
- Specified by:
merge
in class GenericUDAFEvaluator
partial
- The partial aggregation result.
- Throws:
HiveException
terminatePartial
public Object terminatePartial(GenericUDAFEvaluator.AggregationBuffer agg)
throws HiveException
- Description copied from class:
GenericUDAFEvaluator
- Get partial aggregation result.
- Specified by:
terminatePartial
in class GenericUDAFEvaluator
- Returns:
- partial aggregation result.
- Throws:
HiveException
iterate
public void iterate(GenericUDAFEvaluator.AggregationBuffer agg,
Object[] parameters)
throws HiveException
- Description copied from class:
GenericUDAFEvaluator
- Iterate through original data.
- Specified by:
iterate
in class GenericUDAFEvaluator
parameters
- The objects of parameters.
- Throws:
HiveException
getNewAggregationBuffer
public GenericUDAFEvaluator.AggregationBuffer getNewAggregationBuffer()
throws HiveException
- Description copied from class:
GenericUDAFEvaluator
- Get a new aggregation object.
- Specified by:
getNewAggregationBuffer
in class GenericUDAFEvaluator
- Throws:
HiveException
getQuantileArray
protected double[] getQuantileArray(ConstantObjectInspector quantileOI)
throws HiveException
- Throws:
HiveException
reset
public void reset(GenericUDAFEvaluator.AggregationBuffer agg)
throws HiveException
- Description copied from class:
GenericUDAFEvaluator
- Reset the aggregation. This is useful if we want to reuse the same
aggregation.
- Specified by:
reset
in class GenericUDAFEvaluator
- Throws:
HiveException
Copyright © 2011 The Apache Software Foundation