| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/main/relation/distinct_relation.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/main/relation.hpp" |
| 12 | |
| 13 | namespace duckdb { |
| 14 | |
| 15 | class DistinctRelation : public Relation { |
| 16 | public: |
| 17 | explicit DistinctRelation(shared_ptr<Relation> child); |
| 18 | |
| 19 | shared_ptr<Relation> child; |
| 20 | |
| 21 | public: |
| 22 | unique_ptr<QueryNode> GetQueryNode() override; |
| 23 | |
| 24 | const vector<ColumnDefinition> &Columns() override; |
| 25 | string ToString(idx_t depth) override; |
| 26 | string GetAlias() override; |
| 27 | |
| 28 | public: |
| 29 | bool InheritsColumnBindings() override { |
| 30 | return true; |
| 31 | } |
| 32 | Relation *ChildRelation() override { |
| 33 | return child.get(); |
| 34 | } |
| 35 | }; |
| 36 | |
| 37 | } // namespace duckdb |
| 38 |