1 | #include "duckdb/execution/operator/projection/physical_projection.hpp" |
---|---|
2 | #include "duckdb/execution/physical_plan_generator.hpp" |
3 | #include "duckdb/planner/operator/logical_projection.hpp" |
4 | |
5 | using namespace duckdb; |
6 | using namespace std; |
7 | |
8 | unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalProjection &op) { |
9 | assert(op.children.size() == 1); |
10 | auto plan = CreatePlan(*op.children[0]); |
11 | |
12 | #ifdef DEBUG |
13 | for (auto &expr : op.expressions) { |
14 | assert(!expr->IsWindow() && !expr->IsAggregate()); |
15 | } |
16 | #endif |
17 | |
18 | auto projection = make_unique<PhysicalProjection>(op, move(op.expressions)); |
19 | projection->children.push_back(move(plan)); |
20 | return move(projection); |
21 | } |
22 |