1#include "duckdb/execution/operator/scan/physical_chunk_scan.hpp"
2#include "duckdb/execution/physical_plan_generator.hpp"
3#include "duckdb/planner/operator/logical_chunk_get.hpp"
4
5using namespace duckdb;
6using namespace std;
7
8unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalChunkGet &op) {
9 assert(op.children.size() == 0);
10 assert(op.collection);
11
12 // create a PhysicalChunkScan pointing towards the owned collection
13 auto chunk_scan = make_unique<PhysicalChunkScan>(op.types, PhysicalOperatorType::CHUNK_SCAN);
14 chunk_scan->owned_collection = move(op.collection);
15 chunk_scan->collection = chunk_scan->owned_collection.get();
16 return move(chunk_scan);
17}
18