91 std::variant<long, double, bool, std::string,
92 std::vector<long>, std::vector<double>, std::vector<bool>, std::vector<std::string> >
v;
AggregationOperator
SQL aggregation functions tracked by ProvSQL.
@ OR
Boolean OR aggregate.
@ COUNT
COUNT(*) or COUNT(expr) → integer.
@ AND
Boolean AND aggregate.
@ SUM
SUM → integer or float.
@ ARRAY_AGG
Array aggregation.
@ NONE
No aggregation (returns NULL)
@ CHOOSE
Arbitrary selection (pick one element)
ComparisonOperator
SQL comparison operators used in gate_cmp circuit gates.
@ LE
Less than or equal (<=)
@ GE
Greater than or equal (>=)
AggregationOperator getAggregationOperator(Oid oid)
Map a PostgreSQL aggregate function OID to an AggregationOperator.
std::unique_ptr< Aggregator > makeAggregator(AggregationOperator op, ValueType t)
Create a concrete Aggregator for the given operator and value type.
ValueType
Runtime type tag for aggregate values.
@ ARRAY_INT
Array of integers.
@ ARRAY_BOOLEAN
Array of booleans.
@ INT
Signed 64-bit integer.
@ ARRAY_FLOAT
Array of floats.
@ ARRAY_STRING
Array of strings.
@ FLOAT
Double-precision float.
A dynamically-typed aggregate value.
AggValue(std::vector< bool > vec)
Construct a boolean-array value.
ValueType getType() const
Return the runtime type tag of this value.
AggValue(std::vector< long > vec)
Construct an integer-array value.
AggValue()
Construct a NULL (NONE) value.
AggValue(long l)
Construct an integer value.
ValueType t
Active type tag.
AggValue(std::vector< std::string > vec)
Construct a string-array value.
AggValue(double d)
Construct a float value.
AggValue(std::string s)
Construct a string value.
AggValue(bool b)
Construct a boolean value.
std::variant< long, double, bool, std::string, std::vector< long >, std::vector< double >, std::vector< bool >, std::vector< std::string > > v
The variant holding the actual value.
AggValue(std::vector< double > vec)
Construct a float-array value.
Abstract interface for an incremental aggregate accumulator.
virtual AggregationOperator op() const =0
Return the aggregation operator this accumulator implements.
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 ValueType inputType() const =0
Return the type of the input values accepted by add().
virtual ~Aggregator()=default
virtual ValueType resultType() const
Return the type of the value returned by finalize().