1#include "duckdb/execution/operator/scan/physical_dummy_scan.hpp"
2#include "duckdb/execution/physical_plan_generator.hpp"
3#include "duckdb/planner/operator/logical_prepare.hpp"
4#include "duckdb/execution/operator/helper/physical_prepare.hpp"
5
6namespace duckdb {
7
8unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalPrepare &op) {
9 D_ASSERT(op.children.size() <= 1);
10
11 // generate physical plan
12 if (!op.children.empty()) {
13 auto plan = CreatePlan(op&: *op.children[0]);
14 op.prepared->types = plan->types;
15 op.prepared->plan = std::move(plan);
16 }
17
18 return make_uniq<PhysicalPrepare>(args&: op.name, args: std::move(op.prepared), args&: op.estimated_cardinality);
19}
20
21} // namespace duckdb
22