| 1 | //===----------------------------------------------------------------------===// |
|---|---|
| 2 | // DuckDB |
| 3 | // |
| 4 | // duckdb/planner/operator/logical_order.hpp |
| 5 | // |
| 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "duckdb/planner/bound_query_node.hpp" |
| 12 | #include "duckdb/planner/logical_operator.hpp" |
| 13 | |
| 14 | namespace duckdb { |
| 15 | |
| 16 | //! LogicalOrder represents an ORDER BY clause, sorting the data |
| 17 | class LogicalOrder : public LogicalOperator { |
| 18 | public: |
| 19 | LogicalOrder(vector<BoundOrderByNode> orders) |
| 20 | : LogicalOperator(LogicalOperatorType::ORDER_BY), orders(move(orders)) { |
| 21 | } |
| 22 | |
| 23 | vector<BoundOrderByNode> orders; |
| 24 | |
| 25 | public: |
| 26 | vector<ColumnBinding> GetColumnBindings() override { |
| 27 | return children[0]->GetColumnBindings(); |
| 28 | } |
| 29 | |
| 30 | protected: |
| 31 | void ResolveTypes() override { |
| 32 | types = children[0]->types; |
| 33 | } |
| 34 | }; |
| 35 | } // namespace duckdb |
| 36 |