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