public abstract static class BatchApproxCountDistinctAggFunctions.ApproxCountDistinctAggFunction<T> extends BuiltInAggregateFunction<Long,HllBuffer>
Constructor and Description |
---|
ApproxCountDistinctAggFunction(LogicalType valueType) |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(HllBuffer buffer,
Object input) |
HllBuffer |
createAccumulator()
Creates and initializes the accumulator for this
ImperativeAggregateFunction . |
DataType |
getAccumulatorDataType() |
List<DataType> |
getArgumentDataTypes() |
DataType |
getOutputDataType() |
Long |
getValue(HllBuffer buffer)
Called every time when an aggregation result should be materialized.
|
void |
merge(HllBuffer buffer,
Iterable<HllBuffer> it) |
void |
resetAccumulator(HllBuffer buffer) |
getRequirements, getTypeInference, isDeterministic
getKind
getAccumulatorType, getResultType
close, functionIdentifier, open, toString
public ApproxCountDistinctAggFunction(LogicalType valueType)
public HllBuffer createAccumulator()
ImperativeAggregateFunction
ImperativeAggregateFunction
.
The accumulator is an intermediate data structure that stores the aggregated values until a final aggregation result is computed.
createAccumulator
in class ImperativeAggregateFunction<Long,HllBuffer>
public void accumulate(HllBuffer buffer, Object input) throws Exception
Exception
public void merge(HllBuffer buffer, Iterable<HllBuffer> it) throws Exception
Exception
public void resetAccumulator(HllBuffer buffer)
public Long getValue(HllBuffer buffer)
AggregateFunction
getValue
in class AggregateFunction<Long,HllBuffer>
buffer
- the accumulator which contains the current intermediate resultspublic List<DataType> getArgumentDataTypes()
getArgumentDataTypes
in class BuiltInAggregateFunction<Long,HllBuffer>
public DataType getAccumulatorDataType()
getAccumulatorDataType
in class BuiltInAggregateFunction<Long,HllBuffer>
public DataType getOutputDataType()
getOutputDataType
in class BuiltInAggregateFunction<Long,HllBuffer>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.