| 1 | //===----------------------------------------------------------------------===// |
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/planner/operator/logical_aggregate.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/planner/logical_operator.hpp" |
| 12 | #include "duckdb/planner/column_binding.hpp" |
| 13 | |
| 14 | namespace duckdb { |
| 15 | |
| 16 | //! LogicalAggregate represents an aggregate operation with (optional) GROUP BY |
| 17 | //! operator. |
| 18 | class LogicalAggregate : public LogicalOperator { |
| 19 | public: |
| 20 | LogicalAggregate(idx_t group_index, idx_t aggregate_index, vector<unique_ptr<Expression>> select_list); |
| 21 | |
| 22 | //! The table index for the groups of the LogicalAggregate |
| 23 | idx_t group_index; |
| 24 | //! The table index for the aggregates of the LogicalAggregate |
| 25 | idx_t aggregate_index; |
| 26 | //! The set of groups (optional). |
| 27 | vector<unique_ptr<Expression>> groups; |
| 28 | |
| 29 | public: |
| 30 | string ParamsToString() const override; |
| 31 | |
| 32 | vector<ColumnBinding> GetColumnBindings() override; |
| 33 | |
| 34 | protected: |
| 35 | void ResolveTypes() override; |
| 36 | }; |
| 37 | } // namespace duckdb |
| 38 | |