public class DecimalAvgAggregate extends AvgAggregate<BigDecimal>
Constructor and Description |
---|
DecimalAvgAggregate() |
Modifier and Type | Method and Description |
---|---|
BigDecimal |
evaluate(Row buffer)
Calculate the final aggregated result based on aggregate buffer.
|
void |
initiate(Row partial)
Initiate the intermediate aggregate value in Row.
|
TypeInformation<?>[] |
intermediateDataType()
Intermediate aggregate value types.
|
void |
merge(Row partial,
Row buffer)
Merge intermediate aggregate data into aggregate buffer.
|
void |
prepare(Object value,
Row partial)
Transform the aggregate field value into intermediate aggregate data.
|
partialCountIndex, partialSumIndex, setAggOffsetInRow, supportPartial
public TypeInformation<?>[] intermediateDataType()
Aggregate
public void initiate(Row partial)
Aggregate
partial
- The intermediate aggregate row to initiate.public void prepare(Object value, Row partial)
Aggregate
value
- The value to insert into the intermediate aggregate row.partial
- The intermediate aggregate row into which the value is inserted.public void merge(Row partial, Row buffer)
Aggregate
partial
- The intermediate aggregate row to merge.buffer
- The aggregate buffer into which the intermedidate is merged.public BigDecimal evaluate(Row buffer)
Aggregate
buffer
- The aggregate buffer from which the final aggregate is computed.Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.