1#include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp"
2#include "duckdb/execution/operator/persistent/physical_update.hpp"
3#include "duckdb/execution/physical_plan_generator.hpp"
4#include "duckdb/planner/operator/logical_update.hpp"
5
6using namespace duckdb;
7using namespace std;
8
9unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalUpdate &op) {
10 assert(op.children.size() == 1);
11
12 auto plan = CreatePlan(*op.children[0]);
13
14 dependencies.insert(op.table);
15 auto update = make_unique<PhysicalUpdate>(op, *op.table, *op.table->storage, op.columns, move(op.expressions),
16 move(op.bound_defaults));
17 update->is_index_update = op.is_index_update;
18 update->children.push_back(move(plan));
19 return move(update);
20}
21