![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Abstract interface for an incremental aggregate accumulator. More...
#include "Aggregation.h"

Public Member Functions | |
| virtual | ~Aggregator ()=default |
| virtual void | add (const AggValue &x)=0 |
| Incorporate one input value into the running aggregate. | |
| virtual AggValue | finalize () const =0 |
| Return the final aggregate result. | |
| virtual AggregationOperator | op () const =0 |
| Return the aggregation operator this accumulator implements. | |
| virtual ValueType | inputType () const =0 |
Return the type of the input values accepted by add(). | |
| virtual ValueType | resultType () const |
Return the type of the value returned by finalize(). | |
Abstract interface for an incremental aggregate accumulator.
Each concrete subclass implements one aggregation function for one input type (e.g., SUM over integers, MAX over floats). Instances are created by makeAggregator().
Definition at line 138 of file Aggregation.h.
|
virtualdefault |
|
pure virtual |
Incorporate one input value into the running aggregate.
| x | Input value to add. |
Implemented in NoneAgg, SumAgg< T >, MinAgg< T >, MaxAgg< T >, AndAgg, OrAgg, ChooseAgg< T >, AvgAgg< T >, and ArrayAgg< T >.
|
pure virtual |
Return the final aggregate result.
AggValue. Implemented in NoneAgg, StandardAgg< T >, StandardAgg< bool >, AvgAgg< T >, and ArrayAgg< T >.
|
pure virtual |
Return the type of the input values accepted by add().
ValueType of values passed to add(). Implemented in NoneAgg, StandardAgg< T >, StandardAgg< bool >, and AvgAgg< T >.

|
pure virtual |
Return the aggregation operator this accumulator implements.
AggregationOperator enum value for this accumulator. Implemented in NoneAgg, SumAgg< T >, MinAgg< T >, MaxAgg< T >, AndAgg, OrAgg, ChooseAgg< T >, AvgAgg< T >, and ArrayAgg< T >.
|
inlinevirtual |
Return the type of the value returned by finalize().
Defaults to inputType(); override when the result type differs (e.g., AVG returns FLOAT regardless of the input type).
ValueType of the value returned by finalize(). Reimplemented in AvgAgg< T >, and ArrayAgg< T >.
Definition at line 172 of file Aggregation.h.
