1#include "duckdb/execution/operator/order/physical_order.hpp"
2#include "duckdb/execution/physical_plan_generator.hpp"
3#include "duckdb/planner/operator/logical_order.hpp"
4
5using namespace duckdb;
6using namespace std;
7
8unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalOrder &op) {
9 assert(op.children.size() == 1);
10
11 auto plan = CreatePlan(*op.children[0]);
12 if (op.orders.size() > 0) {
13 auto order = make_unique<PhysicalOrder>(op.types, move(op.orders));
14 order->children.push_back(move(plan));
15 plan = move(order);
16 }
17 return plan;
18}
19