VT
- the "Value Type" to aggregate, e.g. DoubleValue, StringValuePT
- the "Primitive Type" that "Value Type" can be naturally converted to, e.g.
DoubleValue converts to DoubleR
- the result type of the aggregation, e.g. NumericColumnSummary<Double>A
- the underlying primitive Aggregator that does the actual work, e.g.
DoubleSummaryAggregator@Internal public abstract class ValueSummaryAggregator<VT extends Value,PT,R,A extends Aggregator<PT,R>> extends Object implements Aggregator<VT,R>
Modifier and Type | Class and Description |
---|---|
static class |
ValueSummaryAggregator.BooleanValueSummaryAggregator
A
ValueSummaryAggregator for Boolean . |
static class |
ValueSummaryAggregator.DoubleValueSummaryAggregator
A
ValueSummaryAggregator for Double . |
static class |
ValueSummaryAggregator.FloatValueSummaryAggregator
A
ValueSummaryAggregator for Float . |
static class |
ValueSummaryAggregator.IntegerValueSummaryAggregator
A
ValueSummaryAggregator for Integer . |
static class |
ValueSummaryAggregator.LongValueSummaryAggregator
A
ValueSummaryAggregator for Long . |
static class |
ValueSummaryAggregator.ShortValueSummaryAggregator
A
ValueSummaryAggregator for Short . |
static class |
ValueSummaryAggregator.StringValueSummaryAggregator
A
ValueSummaryAggregator for String . |
Constructor and Description |
---|
ValueSummaryAggregator() |
Modifier and Type | Method and Description |
---|---|
void |
aggregate(VT value)
Add a value to the current aggregation.
|
void |
combine(Aggregator<VT,R> otherSameType)
Combine two aggregations of the same type.
|
protected abstract PT |
getValue(VT value)
Get the value out of a value type.
|
protected abstract A |
initPrimitiveAggregator()
Initialize an aggregator that can be used for the underlying primitive in the Value type.
|
R |
result()
Provide the final result of the aggregation.
|
public void aggregate(VT value)
Aggregator
aggregate
in interface Aggregator<VT extends Value,R>
public void combine(Aggregator<VT,R> otherSameType)
Aggregator
(Implementations will need to do an unchecked cast).
combine
in interface Aggregator<VT extends Value,R>
public R result()
Aggregator
result
in interface Aggregator<VT extends Value,R>
protected abstract A initPrimitiveAggregator()
E.g. DoubleValues can easily be converted to Double and could use an underlying Aggregator<Double,?>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.