| 1 | #include "duckdb/execution/operator/order/physical_top_n.hpp" |
|---|---|
| 2 | #include "duckdb/execution/physical_plan_generator.hpp" |
| 3 | #include "duckdb/planner/operator/logical_top_n.hpp" |
| 4 | |
| 5 | using namespace duckdb; |
| 6 | using namespace std; |
| 7 | |
| 8 | unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalTopN &op) { |
| 9 | assert(op.children.size() == 1); |
| 10 | |
| 11 | auto plan = CreatePlan(*op.children[0]); |
| 12 | |
| 13 | auto top_n = make_unique<PhysicalTopN>(op, move(op.orders), op.limit, op.offset); |
| 14 | top_n->children.push_back(move(plan)); |
| 15 | return move(top_n); |
| 16 | } |
| 17 |