| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/execution/operator/aggregate/physical_simple_aggregate.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/execution/physical_operator.hpp" |
| 12 | |
| 13 | namespace duckdb { |
| 14 | |
| 15 | //! PhysicalSimpleAggregate is an aggregate operator that can only perform aggregates (1) without any groups, and (2) |
| 16 | //! without any DISTINCT aggregates |
| 17 | class PhysicalSimpleAggregate : public PhysicalOperator { |
| 18 | public: |
| 19 | PhysicalSimpleAggregate(vector<TypeId> types, vector<unique_ptr<Expression>> expressions); |
| 20 | |
| 21 | //! The aggregates that have to be computed |
| 22 | vector<unique_ptr<Expression>> aggregates; |
| 23 | |
| 24 | public: |
| 25 | void GetChunkInternal(ClientContext &context, DataChunk &chunk, PhysicalOperatorState *state) override; |
| 26 | |
| 27 | unique_ptr<PhysicalOperatorState> GetOperatorState() override; |
| 28 | }; |
| 29 | |
| 30 | } // namespace duckdb |
| 31 |