| 1 | #include "duckdb/planner/binder.hpp" |
|---|---|
| 2 | #include "duckdb/planner/operator/logical_cteref.hpp" |
| 3 | #include "duckdb/planner/tableref/bound_cteref.hpp" |
| 4 | |
| 5 | namespace duckdb { |
| 6 | |
| 7 | unique_ptr<LogicalOperator> Binder::CreatePlan(BoundCTERef &ref) { |
| 8 | auto index = ref.bind_index; |
| 9 | |
| 10 | vector<LogicalType> types; |
| 11 | types.reserve(n: ref.types.size()); |
| 12 | for (auto &type : ref.types) { |
| 13 | types.push_back(x: type); |
| 14 | } |
| 15 | |
| 16 | return make_uniq<LogicalCTERef>(args&: index, args&: ref.cte_index, args&: types, args&: ref.bound_columns); |
| 17 | } |
| 18 | |
| 19 | } // namespace duckdb |
| 20 |