public abstract class BigIntegralAvgAggFunction<T> extends AggregateFunction<T,BigIntegralAvgAccumulator>
Constructor and Description |
---|
BigIntegralAvgAggFunction() |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(BigIntegralAvgAccumulator acc,
Object value) |
BigIntegralAvgAccumulator |
createAccumulator()
Creates and init the Accumulator for this
AggregateFunction . |
TypeInformation<?> |
getAccumulatorType() |
T |
getValue(BigIntegralAvgAccumulator acc)
Called every time when an aggregation result should be materialized.
|
void |
merge(BigIntegralAvgAccumulator acc,
Iterable<BigIntegralAvgAccumulator> its) |
void |
resetAccumulator(BigIntegralAvgAccumulator acc) |
abstract T |
resultTypeConvert(BigInteger value)
Convert the intermediate result to the expected aggregation result type
|
void |
retract(BigIntegralAvgAccumulator acc,
Object value) |
requiresOver
close, functionIdentifier, open
public BigIntegralAvgAccumulator createAccumulator()
AggregateFunction
AggregateFunction
.
createAccumulator
in class AggregateFunction<T,BigIntegralAvgAccumulator>
public void accumulate(BigIntegralAvgAccumulator acc, Object value)
public void retract(BigIntegralAvgAccumulator acc, Object value)
public T getValue(BigIntegralAvgAccumulator acc)
AggregateFunction
getValue
in class AggregateFunction<T,BigIntegralAvgAccumulator>
acc
- the accumulator which contains the current
aggregated resultspublic void merge(BigIntegralAvgAccumulator acc, Iterable<BigIntegralAvgAccumulator> its)
public void resetAccumulator(BigIntegralAvgAccumulator acc)
public TypeInformation<?> getAccumulatorType()
public abstract T resultTypeConvert(BigInteger value)
value
- the intermediate result. We use a BigInteger container to
save the intermediate result to avoid the overflow by sum
operation.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.