1 | //===----------------------------------------------------------------------===// |
---|---|
2 | // DuckDB |
3 | // |
4 | // duckdb/main/relation/aggregate_relation.hpp |
5 | // |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #pragma once |
10 | |
11 | #include "duckdb/main/relation.hpp" |
12 | #include "duckdb/parser/parsed_expression.hpp" |
13 | |
14 | namespace duckdb { |
15 | |
16 | class AggregateRelation : public Relation { |
17 | public: |
18 | DUCKDB_API AggregateRelation(shared_ptr<Relation> child, vector<unique_ptr<ParsedExpression>> expressions); |
19 | DUCKDB_API AggregateRelation(shared_ptr<Relation> child, vector<unique_ptr<ParsedExpression>> expressions, |
20 | vector<unique_ptr<ParsedExpression>> groups); |
21 | |
22 | vector<unique_ptr<ParsedExpression>> expressions; |
23 | vector<unique_ptr<ParsedExpression>> groups; |
24 | vector<ColumnDefinition> columns; |
25 | shared_ptr<Relation> child; |
26 | |
27 | public: |
28 | unique_ptr<QueryNode> GetQueryNode() override; |
29 | |
30 | const vector<ColumnDefinition> &Columns() override; |
31 | string ToString(idx_t depth) override; |
32 | string GetAlias() override; |
33 | }; |
34 | |
35 | } // namespace duckdb |
36 |