public class DecimalAvgAggFunction extends AggregateFunction<BigDecimal,DecimalAvgAccumulator>
Constructor and Description |
---|
DecimalAvgAggFunction() |
Modifier and Type | Method and Description |
---|---|
void |
accumulate(DecimalAvgAccumulator acc,
Object value) |
DecimalAvgAccumulator |
createAccumulator()
Creates and init the Accumulator for this
AggregateFunction . |
TypeInformation<?> |
getAccumulatorType() |
BigDecimal |
getValue(DecimalAvgAccumulator acc)
Called every time when an aggregation result should be materialized.
|
void |
merge(DecimalAvgAccumulator acc,
Iterable<DecimalAvgAccumulator> its) |
void |
resetAccumulator(DecimalAvgAccumulator acc) |
void |
retract(DecimalAvgAccumulator acc,
Object value) |
requiresOver
close, functionIdentifier, open
public DecimalAvgAccumulator createAccumulator()
AggregateFunction
AggregateFunction
.
createAccumulator
in class AggregateFunction<BigDecimal,DecimalAvgAccumulator>
public void accumulate(DecimalAvgAccumulator acc, Object value)
public void retract(DecimalAvgAccumulator acc, Object value)
public BigDecimal getValue(DecimalAvgAccumulator acc)
AggregateFunction
getValue
in class AggregateFunction<BigDecimal,DecimalAvgAccumulator>
acc
- the accumulator which contains the current
aggregated resultspublic void merge(DecimalAvgAccumulator acc, Iterable<DecimalAvgAccumulator> its)
public void resetAccumulator(DecimalAvgAccumulator acc)
public TypeInformation<?> getAccumulatorType()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.