1#include "duckdb/execution/physical_plan_generator.hpp"
2#include "duckdb/execution/operator/persistent/physical_copy_to_file.hpp"
3#include "duckdb/planner/operator/logical_copy_to_file.hpp"
4
5using namespace duckdb;
6using namespace std;
7
8unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalCopyToFile &op) {
9 auto plan = CreatePlan(*op.children[0]);
10 // COPY from select statement to file
11 auto copy = make_unique<PhysicalCopyToFile>(op, move(op.info));
12 copy->names = op.names;
13 copy->sql_types = op.sql_types;
14
15 copy->children.push_back(move(plan));
16 return move(copy);
17}
18