1#include "duckdb/execution/physical_plan_generator.hpp"
2#include "duckdb/planner/logical_operator.hpp"
3#include "duckdb/planner/operator/logical_create.hpp"
4
5#include "duckdb/execution/operator/schema/physical_create_schema.hpp"
6#include "duckdb/execution/operator/schema/physical_create_sequence.hpp"
7#include "duckdb/execution/operator/schema/physical_create_view.hpp"
8
9namespace duckdb {
10
11unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalCreate &op) {
12 switch (op.type) {
13 case LogicalOperatorType::CREATE_SEQUENCE:
14 return make_unique<PhysicalCreateSequence>(unique_ptr_cast<CreateInfo, CreateSequenceInfo>(move(op.info)));
15 case LogicalOperatorType::CREATE_VIEW:
16 return make_unique<PhysicalCreateView>(unique_ptr_cast<CreateInfo, CreateViewInfo>(move(op.info)));
17 case LogicalOperatorType::CREATE_SCHEMA:
18 return make_unique<PhysicalCreateSchema>(unique_ptr_cast<CreateInfo, CreateSchemaInfo>(move(op.info)));
19 default:
20 throw NotImplementedException("Unimplemented type for logical simple create");
21 }
22}
23
24} // namespace duckdb
25