duckdb 0.7.2-dev1898.0 → 0.7.2-dev2144.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/binding.gyp +2 -0
  2. package/package.json +1 -1
  3. package/src/data_chunk.cpp +13 -1
  4. package/src/duckdb/extension/parquet/include/parquet_writer.hpp +1 -1
  5. package/src/duckdb/extension/parquet/parquet_metadata.cpp +4 -2
  6. package/src/duckdb/src/catalog/catalog_entry/duck_index_entry.cpp +1 -1
  7. package/src/duckdb/src/common/arrow/arrow_appender.cpp +69 -44
  8. package/src/duckdb/src/common/arrow/arrow_converter.cpp +1 -1
  9. package/src/duckdb/src/common/arrow/arrow_wrapper.cpp +20 -2
  10. package/src/duckdb/src/common/box_renderer.cpp +4 -2
  11. package/src/duckdb/src/common/constants.cpp +10 -1
  12. package/src/duckdb/src/common/filename_pattern.cpp +41 -0
  13. package/src/duckdb/src/common/hive_partitioning.cpp +144 -15
  14. package/src/duckdb/src/common/radix_partitioning.cpp +101 -369
  15. package/src/duckdb/src/common/row_operations/row_aggregate.cpp +8 -9
  16. package/src/duckdb/src/common/row_operations/row_external.cpp +1 -1
  17. package/src/duckdb/src/common/row_operations/row_gather.cpp +5 -3
  18. package/src/duckdb/src/common/row_operations/row_match.cpp +117 -22
  19. package/src/duckdb/src/common/row_operations/row_scatter.cpp +2 -2
  20. package/src/duckdb/src/common/sort/partition_state.cpp +1 -1
  21. package/src/duckdb/src/common/sort/sort_state.cpp +2 -1
  22. package/src/duckdb/src/common/sort/sorted_block.cpp +1 -1
  23. package/src/duckdb/src/common/types/{column_data_allocator.cpp → column/column_data_allocator.cpp} +2 -2
  24. package/src/duckdb/src/common/types/{column_data_collection.cpp → column/column_data_collection.cpp} +22 -4
  25. package/src/duckdb/src/common/types/{column_data_collection_segment.cpp → column/column_data_collection_segment.cpp} +2 -1
  26. package/src/duckdb/src/common/types/{column_data_consumer.cpp → column/column_data_consumer.cpp} +1 -1
  27. package/src/duckdb/src/common/types/{partitioned_column_data.cpp → column/partitioned_column_data.cpp} +11 -9
  28. package/src/duckdb/src/common/types/row/partitioned_tuple_data.cpp +316 -0
  29. package/src/duckdb/src/common/types/{row_data_collection.cpp → row/row_data_collection.cpp} +1 -1
  30. package/src/duckdb/src/common/types/{row_data_collection_scanner.cpp → row/row_data_collection_scanner.cpp} +2 -2
  31. package/src/duckdb/src/common/types/{row_layout.cpp → row/row_layout.cpp} +1 -1
  32. package/src/duckdb/src/common/types/row/tuple_data_allocator.cpp +465 -0
  33. package/src/duckdb/src/common/types/row/tuple_data_collection.cpp +511 -0
  34. package/src/duckdb/src/common/types/row/tuple_data_iterator.cpp +96 -0
  35. package/src/duckdb/src/common/types/row/tuple_data_layout.cpp +119 -0
  36. package/src/duckdb/src/common/types/row/tuple_data_scatter_gather.cpp +1200 -0
  37. package/src/duckdb/src/common/types/row/tuple_data_segment.cpp +170 -0
  38. package/src/duckdb/src/common/types/vector.cpp +1 -1
  39. package/src/duckdb/src/execution/aggregate_hashtable.cpp +252 -290
  40. package/src/duckdb/src/execution/join_hashtable.cpp +192 -328
  41. package/src/duckdb/src/execution/operator/aggregate/physical_window.cpp +4 -4
  42. package/src/duckdb/src/execution/operator/helper/physical_execute.cpp +3 -3
  43. package/src/duckdb/src/execution/operator/helper/physical_limit_percent.cpp +2 -3
  44. package/src/duckdb/src/execution/operator/helper/physical_result_collector.cpp +2 -3
  45. package/src/duckdb/src/execution/operator/join/perfect_hash_join_executor.cpp +36 -21
  46. package/src/duckdb/src/execution/operator/join/physical_blockwise_nl_join.cpp +2 -2
  47. package/src/duckdb/src/execution/operator/join/physical_cross_product.cpp +1 -1
  48. package/src/duckdb/src/execution/operator/join/physical_delim_join.cpp +2 -2
  49. package/src/duckdb/src/execution/operator/join/physical_hash_join.cpp +166 -144
  50. package/src/duckdb/src/execution/operator/join/physical_index_join.cpp +5 -5
  51. package/src/duckdb/src/execution/operator/join/physical_join.cpp +2 -10
  52. package/src/duckdb/src/execution/operator/join/physical_positional_join.cpp +0 -1
  53. package/src/duckdb/src/execution/operator/order/physical_top_n.cpp +2 -2
  54. package/src/duckdb/src/execution/operator/persistent/physical_copy_to_file.cpp +13 -11
  55. package/src/duckdb/src/execution/operator/persistent/physical_delete.cpp +3 -2
  56. package/src/duckdb/src/execution/operator/persistent/physical_export.cpp +25 -24
  57. package/src/duckdb/src/execution/operator/persistent/physical_insert.cpp +1 -1
  58. package/src/duckdb/src/execution/operator/persistent/physical_update.cpp +4 -3
  59. package/src/duckdb/src/execution/operator/schema/physical_create_type.cpp +1 -1
  60. package/src/duckdb/src/execution/operator/set/physical_recursive_cte.cpp +3 -3
  61. package/src/duckdb/src/execution/partitionable_hashtable.cpp +9 -37
  62. package/src/duckdb/src/execution/physical_operator.cpp +1 -1
  63. package/src/duckdb/src/execution/physical_plan/plan_comparison_join.cpp +19 -18
  64. package/src/duckdb/src/execution/physical_plan/plan_copy_to_file.cpp +2 -1
  65. package/src/duckdb/src/execution/physical_plan/plan_execute.cpp +2 -2
  66. package/src/duckdb/src/execution/physical_plan/plan_explain.cpp +5 -6
  67. package/src/duckdb/src/execution/physical_plan/plan_expression_get.cpp +2 -2
  68. package/src/duckdb/src/execution/physical_plan/plan_recursive_cte.cpp +3 -3
  69. package/src/duckdb/src/execution/physical_plan_generator.cpp +1 -1
  70. package/src/duckdb/src/execution/radix_partitioned_hashtable.cpp +39 -17
  71. package/src/duckdb/src/function/aggregate/sorted_aggregate_function.cpp +2 -2
  72. package/src/duckdb/src/function/table/pragma_detailed_profiling_output.cpp +5 -5
  73. package/src/duckdb/src/function/table/pragma_last_profiling_output.cpp +2 -2
  74. package/src/duckdb/src/function/table/version/pragma_version.cpp +2 -2
  75. package/src/duckdb/src/include/duckdb/catalog/catalog_entry/index_catalog_entry.hpp +1 -1
  76. package/src/duckdb/src/include/duckdb/common/arrow/arrow_appender.hpp +1 -1
  77. package/src/duckdb/src/include/duckdb/common/constants.hpp +2 -0
  78. package/src/duckdb/src/include/duckdb/common/exception.hpp +3 -0
  79. package/src/duckdb/src/include/duckdb/common/fast_mem.hpp +528 -0
  80. package/src/duckdb/src/include/duckdb/common/filename_pattern.hpp +34 -0
  81. package/src/duckdb/src/include/duckdb/common/helper.hpp +10 -0
  82. package/src/duckdb/src/include/duckdb/common/hive_partitioning.hpp +13 -3
  83. package/src/duckdb/src/include/duckdb/common/optional_ptr.hpp +8 -0
  84. package/src/duckdb/src/include/duckdb/common/perfect_map_set.hpp +34 -0
  85. package/src/duckdb/src/include/duckdb/common/radix_partitioning.hpp +80 -27
  86. package/src/duckdb/src/include/duckdb/common/reference_map.hpp +38 -0
  87. package/src/duckdb/src/include/duckdb/common/row_operations/row_operations.hpp +7 -6
  88. package/src/duckdb/src/include/duckdb/common/sort/comparators.hpp +1 -1
  89. package/src/duckdb/src/include/duckdb/common/sort/partition_state.hpp +1 -1
  90. package/src/duckdb/src/include/duckdb/common/sort/sort.hpp +1 -1
  91. package/src/duckdb/src/include/duckdb/common/sort/sorted_block.hpp +2 -2
  92. package/src/duckdb/src/include/duckdb/common/types/batched_data_collection.hpp +1 -1
  93. package/src/duckdb/src/include/duckdb/common/types/{column_data_allocator.hpp → column/column_data_allocator.hpp} +4 -4
  94. package/src/duckdb/src/include/duckdb/common/types/{column_data_collection.hpp → column/column_data_collection.hpp} +2 -2
  95. package/src/duckdb/src/include/duckdb/common/types/{column_data_collection_iterators.hpp → column/column_data_collection_iterators.hpp} +2 -2
  96. package/src/duckdb/src/include/duckdb/common/types/{column_data_collection_segment.hpp → column/column_data_collection_segment.hpp} +3 -3
  97. package/src/duckdb/src/include/duckdb/common/types/{column_data_consumer.hpp → column/column_data_consumer.hpp} +8 -4
  98. package/src/duckdb/src/include/duckdb/common/types/{column_data_scan_states.hpp → column/column_data_scan_states.hpp} +1 -1
  99. package/src/duckdb/src/include/duckdb/common/types/{partitioned_column_data.hpp → column/partitioned_column_data.hpp} +15 -7
  100. package/src/duckdb/src/include/duckdb/common/types/row/partitioned_tuple_data.hpp +140 -0
  101. package/src/duckdb/src/include/duckdb/common/types/{row_data_collection.hpp → row/row_data_collection.hpp} +1 -1
  102. package/src/duckdb/src/include/duckdb/common/types/{row_data_collection_scanner.hpp → row/row_data_collection_scanner.hpp} +2 -2
  103. package/src/duckdb/src/include/duckdb/common/types/{row_layout.hpp → row/row_layout.hpp} +3 -1
  104. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_allocator.hpp +116 -0
  105. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_collection.hpp +239 -0
  106. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_iterator.hpp +64 -0
  107. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_layout.hpp +113 -0
  108. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_segment.hpp +124 -0
  109. package/src/duckdb/src/include/duckdb/common/types/row/tuple_data_states.hpp +74 -0
  110. package/src/duckdb/src/include/duckdb/common/types/validity_mask.hpp +3 -0
  111. package/src/duckdb/src/include/duckdb/common/types/value.hpp +4 -12
  112. package/src/duckdb/src/include/duckdb/execution/aggregate_hashtable.hpp +34 -31
  113. package/src/duckdb/src/include/duckdb/execution/base_aggregate_hashtable.hpp +2 -2
  114. package/src/duckdb/src/include/duckdb/execution/execution_context.hpp +3 -2
  115. package/src/duckdb/src/include/duckdb/execution/expression_executor.hpp +1 -1
  116. package/src/duckdb/src/include/duckdb/execution/join_hashtable.hpp +41 -67
  117. package/src/duckdb/src/include/duckdb/execution/nested_loop_join.hpp +1 -1
  118. package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_execute.hpp +2 -2
  119. package/src/duckdb/src/include/duckdb/execution/operator/helper/physical_result_collector.hpp +1 -1
  120. package/src/duckdb/src/include/duckdb/execution/operator/join/outer_join_marker.hpp +2 -2
  121. package/src/duckdb/src/include/duckdb/execution/operator/join/perfect_hash_join_executor.hpp +1 -1
  122. package/src/duckdb/src/include/duckdb/execution/operator/join/physical_cross_product.hpp +1 -1
  123. package/src/duckdb/src/include/duckdb/execution/operator/join/physical_hash_join.hpp +0 -2
  124. package/src/duckdb/src/include/duckdb/execution/operator/join/physical_index_join.hpp +2 -2
  125. package/src/duckdb/src/include/duckdb/execution/operator/join/physical_positional_join.hpp +1 -1
  126. package/src/duckdb/src/include/duckdb/execution/operator/persistent/physical_copy_to_file.hpp +4 -1
  127. package/src/duckdb/src/include/duckdb/execution/operator/scan/physical_column_data_scan.hpp +1 -1
  128. package/src/duckdb/src/include/duckdb/execution/operator/set/physical_recursive_cte.hpp +1 -1
  129. package/src/duckdb/src/include/duckdb/execution/partitionable_hashtable.hpp +2 -2
  130. package/src/duckdb/src/include/duckdb/main/materialized_query_result.hpp +1 -1
  131. package/src/duckdb/src/include/duckdb/main/query_result.hpp +14 -1
  132. package/src/duckdb/src/include/duckdb/optimizer/expression_rewriter.hpp +3 -3
  133. package/src/duckdb/src/include/duckdb/optimizer/join_order/cardinality_estimator.hpp +16 -16
  134. package/src/duckdb/src/include/duckdb/optimizer/join_order/join_node.hpp +8 -8
  135. package/src/duckdb/src/include/duckdb/optimizer/join_order/join_order_optimizer.hpp +23 -15
  136. package/src/duckdb/src/include/duckdb/optimizer/join_order/join_relation.hpp +9 -10
  137. package/src/duckdb/src/include/duckdb/optimizer/join_order/query_graph.hpp +18 -11
  138. package/src/duckdb/src/include/duckdb/parallel/meta_pipeline.hpp +1 -1
  139. package/src/duckdb/src/include/duckdb/parser/parsed_data/exported_table_data.hpp +5 -1
  140. package/src/duckdb/src/include/duckdb/parser/parsed_data/vacuum_info.hpp +3 -2
  141. package/src/duckdb/src/include/duckdb/parser/query_error_context.hpp +4 -2
  142. package/src/duckdb/src/include/duckdb/parser/transformer.hpp +9 -35
  143. package/src/duckdb/src/include/duckdb/planner/binder.hpp +24 -23
  144. package/src/duckdb/src/include/duckdb/planner/expression_binder.hpp +3 -3
  145. package/src/duckdb/src/include/duckdb/planner/operator/logical_column_data_get.hpp +1 -1
  146. package/src/duckdb/src/include/duckdb/planner/operator/logical_copy_to_file.hpp +3 -1
  147. package/src/duckdb/src/include/duckdb/storage/table/table_index_list.hpp +1 -1
  148. package/src/duckdb/src/main/appender.cpp +6 -6
  149. package/src/duckdb/src/main/client_context.cpp +1 -1
  150. package/src/duckdb/src/main/connection.cpp +2 -2
  151. package/src/duckdb/src/main/query_result.cpp +13 -0
  152. package/src/duckdb/src/optimizer/expression_rewriter.cpp +4 -4
  153. package/src/duckdb/src/optimizer/join_order/cardinality_estimator.cpp +91 -105
  154. package/src/duckdb/src/optimizer/join_order/join_node.cpp +5 -8
  155. package/src/duckdb/src/optimizer/join_order/join_order_optimizer.cpp +163 -160
  156. package/src/duckdb/src/optimizer/join_order/join_relation_set.cpp +30 -30
  157. package/src/duckdb/src/optimizer/join_order/query_graph.cpp +37 -38
  158. package/src/duckdb/src/parallel/executor.cpp +1 -1
  159. package/src/duckdb/src/parallel/meta_pipeline.cpp +2 -2
  160. package/src/duckdb/src/parser/transform/helpers/transform_cte.cpp +1 -1
  161. package/src/duckdb/src/parser/transform/tableref/transform_subquery.cpp +1 -1
  162. package/src/duckdb/src/parser/transformer.cpp +50 -9
  163. package/src/duckdb/src/planner/binder/statement/bind_copy.cpp +15 -5
  164. package/src/duckdb/src/planner/binder/statement/bind_create.cpp +19 -17
  165. package/src/duckdb/src/planner/binder/statement/bind_create_table.cpp +4 -4
  166. package/src/duckdb/src/planner/binder/statement/bind_export.cpp +20 -21
  167. package/src/duckdb/src/planner/binder/tableref/bind_basetableref.cpp +24 -22
  168. package/src/duckdb/src/planner/binder/tableref/bind_subqueryref.cpp +2 -2
  169. package/src/duckdb/src/planner/binder.cpp +16 -19
  170. package/src/duckdb/src/planner/expression_binder.cpp +8 -8
  171. package/src/duckdb/src/planner/operator/logical_copy_to_file.cpp +3 -3
  172. package/src/duckdb/src/storage/checkpoint_manager.cpp +23 -23
  173. package/src/duckdb/src/storage/standard_buffer_manager.cpp +1 -1
  174. package/src/duckdb/src/storage/table_index_list.cpp +3 -3
  175. package/src/duckdb/src/verification/statement_verifier.cpp +1 -1
  176. package/src/duckdb/third_party/libpg_query/src_backend_parser_gram.cpp +5552 -5598
  177. package/src/duckdb/ub_src_common.cpp +2 -0
  178. package/src/duckdb/ub_src_common_types.cpp +0 -16
  179. package/src/duckdb/ub_src_common_types_column.cpp +10 -0
  180. package/src/duckdb/ub_src_common_types_row.cpp +20 -0
  181. package/test/udf.test.ts +9 -0
@@ -60,7 +60,7 @@ public:
60
60
  PhysicalIndexJoin::PhysicalIndexJoin(LogicalOperator &op, unique_ptr<PhysicalOperator> left,
61
61
  unique_ptr<PhysicalOperator> right, vector<JoinCondition> cond, JoinType join_type,
62
62
  const vector<idx_t> &left_projection_map_p, vector<idx_t> right_projection_map_p,
63
- vector<column_t> column_ids_p, Index *index_p, bool lhs_first,
63
+ vector<column_t> column_ids_p, Index &index_p, bool lhs_first,
64
64
  idx_t estimated_cardinality)
65
65
  : CachingPhysicalOperator(PhysicalOperatorType::INDEX_JOIN, std::move(op.types), estimated_cardinality),
66
66
  left_projection_map(left_projection_map_p), right_projection_map(std::move(right_projection_map_p)),
@@ -74,7 +74,7 @@ PhysicalIndexJoin::PhysicalIndexJoin(LogicalOperator &op, unique_ptr<PhysicalOpe
74
74
  condition_types.push_back(condition.left->return_type);
75
75
  }
76
76
  //! Only add to fetch_ids columns that are not indexed
77
- for (auto &index_id : index->column_ids) {
77
+ for (auto &index_id : index.column_ids) {
78
78
  index_ids.insert(index_id);
79
79
  }
80
80
 
@@ -165,7 +165,7 @@ void PhysicalIndexJoin::Output(ExecutionContext &context, DataChunk &input, Data
165
165
  void PhysicalIndexJoin::GetRHSMatches(ExecutionContext &context, DataChunk &input, OperatorState &state_p) const {
166
166
 
167
167
  auto &state = state_p.Cast<IndexJoinOperatorState>();
168
- auto &art = index->Cast<ART>();
168
+ auto &art = index.Cast<ART>();
169
169
  ;
170
170
 
171
171
  // generate the keys for this chunk
@@ -177,11 +177,11 @@ void PhysicalIndexJoin::GetRHSMatches(ExecutionContext &context, DataChunk &inpu
177
177
  if (!state.keys[i].Empty()) {
178
178
  if (fetch_types.empty()) {
179
179
  IndexLock lock;
180
- index->InitializeLock(lock);
180
+ index.InitializeLock(lock);
181
181
  art.SearchEqualJoinNoFetch(state.keys[i], state.result_sizes[i]);
182
182
  } else {
183
183
  IndexLock lock;
184
- index->InitializeLock(lock);
184
+ index.InitializeLock(lock);
185
185
  art.SearchEqual(state.keys[i], (idx_t)-1, state.rhs_rows[i]);
186
186
  state.result_sizes[i] = state.rhs_rows[i].size();
187
187
  }
@@ -41,7 +41,7 @@ void PhysicalJoin::BuildJoinPipelines(Pipeline &current, MetaPipeline &meta_pipe
41
41
 
42
42
  // on the RHS (build side), we construct a child MetaPipeline with this operator as its sink
43
43
  auto child_meta_pipeline = meta_pipeline.CreateChildMetaPipeline(current, &op);
44
- child_meta_pipeline->Build(op.children[1].get());
44
+ child_meta_pipeline->Build(*op.children[1]);
45
45
 
46
46
  // continue building the current pipeline on the LHS (probe side)
47
47
  op.children[0]->BuildPipelines(current, meta_pipeline);
@@ -60,18 +60,10 @@ void PhysicalJoin::BuildJoinPipelines(Pipeline &current, MetaPipeline &meta_pipe
60
60
  // Join can become a source operator if it's RIGHT/OUTER, or if the hash join goes out-of-core
61
61
  bool add_child_pipeline = false;
62
62
  auto &join_op = op.Cast<PhysicalJoin>();
63
- if (IsRightOuterJoin(join_op.join_type)) {
63
+ if (IsRightOuterJoin(join_op.join_type) || join_op.type == PhysicalOperatorType::HASH_JOIN) {
64
64
  add_child_pipeline = true;
65
65
  }
66
66
 
67
- if (join_op.type == PhysicalOperatorType::HASH_JOIN) {
68
- auto &hash_join_op = join_op.Cast<PhysicalHashJoin>();
69
- hash_join_op.can_go_external = !meta_pipeline.HasRecursiveCTE();
70
- if (hash_join_op.can_go_external) {
71
- add_child_pipeline = true;
72
- }
73
- }
74
-
75
67
  if (add_child_pipeline) {
76
68
  meta_pipeline.CreateChildPipeline(current, &op, last_pipeline);
77
69
  }
@@ -1,6 +1,5 @@
1
1
  #include "duckdb/execution/operator/join/physical_positional_join.hpp"
2
2
 
3
- #include "duckdb/common/types/column_data_collection.hpp"
4
3
  #include "duckdb/common/vector_operations/vector_operations.hpp"
5
4
  #include "duckdb/execution/operator/join/physical_join.hpp"
6
5
 
@@ -1,12 +1,12 @@
1
1
  #include "duckdb/execution/operator/order/physical_top_n.hpp"
2
2
 
3
3
  #include "duckdb/common/assert.hpp"
4
+ #include "duckdb/common/sort/sort.hpp"
5
+ #include "duckdb/common/types/row/row_layout.hpp"
4
6
  #include "duckdb/common/value_operations/value_operations.hpp"
5
7
  #include "duckdb/common/vector_operations/vector_operations.hpp"
6
8
  #include "duckdb/execution/expression_executor.hpp"
7
9
  #include "duckdb/storage/data_table.hpp"
8
- #include "duckdb/common/sort/sort.hpp"
9
- #include "duckdb/common/types/row_layout.hpp"
10
10
 
11
11
  namespace duckdb {
12
12
 
@@ -3,6 +3,8 @@
3
3
  #include "duckdb/common/hive_partitioning.hpp"
4
4
  #include "duckdb/common/file_system.hpp"
5
5
  #include "duckdb/common/file_opener.hpp"
6
+ #include "duckdb/common/types/uuid.hpp"
7
+ #include "duckdb/common/string_util.hpp"
6
8
 
7
9
  #include <algorithm>
8
10
 
@@ -40,6 +42,7 @@ public:
40
42
  //===--------------------------------------------------------------------===//
41
43
  // Sink
42
44
  //===--------------------------------------------------------------------===//
45
+
43
46
  void MoveTmpFile(ClientContext &context, const string &tmp_file_path) {
44
47
  auto &fs = FileSystem::GetFileSystem(context);
45
48
  auto file_path = tmp_file_path.substr(0, tmp_file_path.length() - 4);
@@ -111,10 +114,10 @@ void PhysicalCopyToFile::Combine(ExecutionContext &context, GlobalSinkState &gst
111
114
  for (idx_t i = 0; i < partitions.size(); i++) {
112
115
  string hive_path =
113
116
  CreateDirRecursive(partition_columns, names, partition_key_map[i]->values, trimmed_path, fs);
114
- string full_path = fs.JoinPath(hive_path, "data_" + to_string(l.writer_offset) + "." + function.extension);
115
- if (fs.FileExists(full_path) && !allow_overwrite) {
117
+ string full_path(filename_pattern.CreateFilename(fs, hive_path, function.extension, l.writer_offset));
118
+ if (fs.FileExists(full_path) && !overwrite_or_ignore) {
116
119
  throw IOException("failed to create " + full_path +
117
- ", file exists! Enable ALLOW_OVERWRITE option to force writing");
120
+ ", file exists! Enable OVERWRITE_OR_IGNORE option to force writing");
118
121
  }
119
122
  // Create a writer for the current file
120
123
  auto fun_data_global = function.copy_to_initialize_global(context.client, *bind_data, full_path);
@@ -184,10 +187,9 @@ unique_ptr<LocalSinkState> PhysicalCopyToFile::GetLocalSinkState(ExecutionContex
184
187
  this_file_offset = g.last_file_offset++;
185
188
  }
186
189
  auto &fs = FileSystem::GetFileSystem(context.client);
187
- string output_path =
188
- fs.JoinPath(file_path, StringUtil::Format("out_%llu", this_file_offset) + "." + function.extension);
189
- if (fs.FileExists(output_path) && !allow_overwrite) {
190
- throw IOException("%s exists! Enable ALLOW_OVERWRITE option to force writing", output_path);
190
+ string output_path(filename_pattern.CreateFilename(fs, file_path, function.extension, this_file_offset));
191
+ if (fs.FileExists(output_path) && !overwrite_or_ignore) {
192
+ throw IOException("%s exists! Enable OVERWRITE_OR_IGNORE option to force writing", output_path);
191
193
  }
192
194
  res->global_state = function.copy_to_initialize_global(context.client, *bind_data, output_path);
193
195
  }
@@ -199,17 +201,17 @@ unique_ptr<GlobalSinkState> PhysicalCopyToFile::GetGlobalSinkState(ClientContext
199
201
  if (partition_output || per_thread_output) {
200
202
  auto &fs = FileSystem::GetFileSystem(context);
201
203
 
202
- if (fs.FileExists(file_path) && !allow_overwrite) {
203
- throw IOException("%s exists! Enable ALLOW_OVERWRITE option to force writing", file_path);
204
+ if (fs.FileExists(file_path) && !overwrite_or_ignore) {
205
+ throw IOException("%s exists! Enable OVERWRITE_OR_IGNORE option to force writing", file_path);
204
206
  }
205
207
  if (!fs.DirectoryExists(file_path)) {
206
208
  fs.CreateDirectory(file_path);
207
- } else if (!allow_overwrite) {
209
+ } else if (!overwrite_or_ignore) {
208
210
  idx_t n_files = 0;
209
211
  fs.ListFiles(
210
212
  file_path, [&n_files](const string &path, bool) { n_files++; }, FileOpener::Get(context));
211
213
  if (n_files > 0) {
212
- throw IOException("Directory %s is not empty! Enable ALLOW_OVERWRITE option to force writing",
214
+ throw IOException("Directory %s is not empty! Enable OVERWRITE_OR_IGNORE option to force writing",
213
215
  file_path);
214
216
  }
215
217
  }
@@ -1,10 +1,11 @@
1
1
  #include "duckdb/execution/operator/persistent/physical_delete.hpp"
2
2
 
3
+ #include "duckdb/common/atomic.hpp"
4
+ #include "duckdb/common/types/column/column_data_collection.hpp"
3
5
  #include "duckdb/execution/expression_executor.hpp"
4
6
  #include "duckdb/storage/data_table.hpp"
5
- #include "duckdb/transaction/duck_transaction.hpp"
6
- #include "duckdb/common/types/column_data_collection.hpp"
7
7
  #include "duckdb/storage/table/scan_state.hpp"
8
+ #include "duckdb/transaction/duck_transaction.hpp"
8
9
 
9
10
  namespace duckdb {
10
11
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  #include "duckdb/catalog/catalog.hpp"
4
4
  #include "duckdb/catalog/catalog_entry/schema_catalog_entry.hpp"
5
+ #include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp"
5
6
  #include "duckdb/common/file_system.hpp"
6
7
  #include "duckdb/common/string_util.hpp"
7
8
  #include "duckdb/parallel/meta_pipeline.hpp"
@@ -16,12 +17,12 @@ namespace duckdb {
16
17
 
17
18
  using std::stringstream;
18
19
 
19
- static void WriteCatalogEntries(stringstream &ss, vector<CatalogEntry *> &entries) {
20
+ static void WriteCatalogEntries(stringstream &ss, vector<reference<CatalogEntry>> &entries) {
20
21
  for (auto &entry : entries) {
21
- if (entry->internal) {
22
+ if (entry.get().internal) {
22
23
  continue;
23
24
  }
24
- ss << entry->ToSQL() << std::endl;
25
+ ss << entry.get().ToSQL() << std::endl;
25
26
  }
26
27
  ss << std::endl;
27
28
  }
@@ -42,8 +43,8 @@ static void WriteValueAsSQL(stringstream &ss, Value &val) {
42
43
  }
43
44
  }
44
45
 
45
- static void WriteCopyStatement(FileSystem &fs, stringstream &ss, TableCatalogEntry *table, CopyInfo &info,
46
- ExportedTableData &exported_table, CopyFunction const &function) {
46
+ static void WriteCopyStatement(FileSystem &fs, stringstream &ss, CopyInfo &info, ExportedTableData &exported_table,
47
+ CopyFunction const &function) {
47
48
  ss << "COPY ";
48
49
 
49
50
  if (exported_table.schema_name != DEFAULT_SCHEMA) {
@@ -107,52 +108,53 @@ void PhysicalExport::GetData(ExecutionContext &context, DataChunk &chunk, Global
107
108
  auto *opener = FileSystem::GetFileOpener(ccontext);
108
109
 
109
110
  // gather all catalog types to export
110
- vector<CatalogEntry *> schemas;
111
- vector<CatalogEntry *> custom_types;
112
- vector<CatalogEntry *> sequences;
113
- vector<CatalogEntry *> tables;
114
- vector<CatalogEntry *> views;
115
- vector<CatalogEntry *> indexes;
116
- vector<CatalogEntry *> macros;
111
+ vector<reference<CatalogEntry>> schemas;
112
+ vector<reference<CatalogEntry>> custom_types;
113
+ vector<reference<CatalogEntry>> sequences;
114
+ vector<reference<CatalogEntry>> tables;
115
+ vector<reference<CatalogEntry>> views;
116
+ vector<reference<CatalogEntry>> indexes;
117
+ vector<reference<CatalogEntry>> macros;
117
118
 
118
119
  auto schema_list = Catalog::GetSchemas(ccontext, info->catalog);
119
120
  for (auto &schema : schema_list) {
120
121
  if (!schema->internal) {
121
- schemas.push_back(schema);
122
+ schemas.push_back(*schema);
122
123
  }
123
124
  schema->Scan(context.client, CatalogType::TABLE_ENTRY, [&](CatalogEntry *entry) {
124
125
  if (entry->internal) {
125
126
  return;
126
127
  }
127
128
  if (entry->type != CatalogType::TABLE_ENTRY) {
128
- views.push_back(entry);
129
+ views.push_back(*entry);
129
130
  }
130
131
  });
131
132
  schema->Scan(context.client, CatalogType::SEQUENCE_ENTRY,
132
- [&](CatalogEntry *entry) { sequences.push_back(entry); });
133
+ [&](CatalogEntry *entry) { sequences.push_back(*entry); });
133
134
  schema->Scan(context.client, CatalogType::TYPE_ENTRY,
134
- [&](CatalogEntry *entry) { custom_types.push_back(entry); });
135
- schema->Scan(context.client, CatalogType::INDEX_ENTRY, [&](CatalogEntry *entry) { indexes.push_back(entry); });
135
+ [&](CatalogEntry *entry) { custom_types.push_back(*entry); });
136
+ schema->Scan(context.client, CatalogType::INDEX_ENTRY, [&](CatalogEntry *entry) { indexes.push_back(*entry); });
136
137
  schema->Scan(context.client, CatalogType::MACRO_ENTRY, [&](CatalogEntry *entry) {
137
138
  if (!entry->internal && entry->type == CatalogType::MACRO_ENTRY) {
138
- macros.push_back(entry);
139
+ macros.push_back(*entry);
139
140
  }
140
141
  });
141
142
  schema->Scan(context.client, CatalogType::TABLE_MACRO_ENTRY, [&](CatalogEntry *entry) {
142
143
  if (!entry->internal && entry->type == CatalogType::TABLE_MACRO_ENTRY) {
143
- macros.push_back(entry);
144
+ macros.push_back(*entry);
144
145
  }
145
146
  });
146
147
  }
147
148
 
148
149
  // consider the order of tables because of foreign key constraint
149
150
  for (idx_t i = 0; i < exported_tables.data.size(); i++) {
150
- tables.push_back((CatalogEntry *)exported_tables.data[i].entry);
151
+ tables.push_back(exported_tables.data[i].entry);
151
152
  }
152
153
 
153
154
  // order macro's by timestamp so nested macro's are imported nicely
154
- sort(macros.begin(), macros.end(),
155
- [](const CatalogEntry *lhs, const CatalogEntry *rhs) { return lhs->oid < rhs->oid; });
155
+ sort(macros.begin(), macros.end(), [](const reference<CatalogEntry> &lhs, const reference<CatalogEntry> &rhs) {
156
+ return lhs.get().oid < rhs.get().oid;
157
+ });
156
158
 
157
159
  // write the schema.sql file
158
160
  // export order is SCHEMA -> SEQUENCE -> TABLE -> VIEW -> INDEX
@@ -172,9 +174,8 @@ void PhysicalExport::GetData(ExecutionContext &context, DataChunk &chunk, Global
172
174
  // for every table, we write COPY INTO statement with the specified options
173
175
  stringstream load_ss;
174
176
  for (idx_t i = 0; i < exported_tables.data.size(); i++) {
175
- auto &table = exported_tables.data[i].entry;
176
177
  auto exported_table_info = exported_tables.data[i].table_data;
177
- WriteCopyStatement(fs, load_ss, table, *info, exported_table_info, function);
178
+ WriteCopyStatement(fs, load_ss, *info, exported_table_info, function);
178
179
  }
179
180
  WriteStringStreamToFile(fs, opener, load_ss, fs.JoinPath(info->file_path, "load.sql"));
180
181
  state.finished = true;
@@ -1,7 +1,7 @@
1
1
  #include "duckdb/execution/operator/persistent/physical_insert.hpp"
2
2
  #include "duckdb/parallel/thread_context.hpp"
3
3
  #include "duckdb/catalog/catalog_entry/duck_table_entry.hpp"
4
- #include "duckdb/common/types/column_data_collection.hpp"
4
+ #include "duckdb/common/types/column/column_data_collection.hpp"
5
5
  #include "duckdb/common/vector_operations/vector_operations.hpp"
6
6
  #include "duckdb/execution/expression_executor.hpp"
7
7
  #include "duckdb/storage/data_table.hpp"
@@ -1,12 +1,13 @@
1
1
  #include "duckdb/execution/operator/persistent/physical_update.hpp"
2
- #include "duckdb/parallel/thread_context.hpp"
2
+
3
3
  #include "duckdb/catalog/catalog_entry/table_catalog_entry.hpp"
4
- #include "duckdb/common/types/column_data_collection.hpp"
4
+ #include "duckdb/common/types/column/column_data_collection.hpp"
5
5
  #include "duckdb/common/vector_operations/vector_operations.hpp"
6
6
  #include "duckdb/execution/expression_executor.hpp"
7
+ #include "duckdb/main/client_context.hpp"
8
+ #include "duckdb/parallel/thread_context.hpp"
7
9
  #include "duckdb/planner/expression/bound_reference_expression.hpp"
8
10
  #include "duckdb/storage/data_table.hpp"
9
- #include "duckdb/main/client_context.hpp"
10
11
 
11
12
  namespace duckdb {
12
13
 
@@ -1,7 +1,7 @@
1
1
  #include "duckdb/execution/operator/schema/physical_create_type.hpp"
2
2
 
3
3
  #include "duckdb/catalog/catalog.hpp"
4
- #include "duckdb/common/types/column_data_collection.hpp"
4
+ #include "duckdb/common/types/column/column_data_collection.hpp"
5
5
 
6
6
  namespace duckdb {
7
7
 
@@ -1,6 +1,6 @@
1
1
  #include "duckdb/execution/operator/set/physical_recursive_cte.hpp"
2
2
 
3
- #include "duckdb/common/types/column_data_collection.hpp"
3
+ #include "duckdb/common/types/column/column_data_collection.hpp"
4
4
  #include "duckdb/common/vector_operations/vector_operations.hpp"
5
5
  #include "duckdb/execution/aggregate_hashtable.hpp"
6
6
  #include "duckdb/execution/executor.hpp"
@@ -183,12 +183,12 @@ void PhysicalRecursiveCTE::BuildPipelines(Pipeline &current, MetaPipeline &meta_
183
183
 
184
184
  // the LHS of the recursive CTE is our initial state
185
185
  auto initial_state_pipeline = meta_pipeline.CreateChildMetaPipeline(current, this);
186
- initial_state_pipeline->Build(children[0].get());
186
+ initial_state_pipeline->Build(*children[0]);
187
187
 
188
188
  // the RHS is the recursive pipeline
189
189
  recursive_meta_pipeline = make_shared<MetaPipeline>(executor, state, this);
190
190
  recursive_meta_pipeline->SetRecursiveCTE();
191
- recursive_meta_pipeline->Build(children[1].get());
191
+ recursive_meta_pipeline->Build(*children[1]);
192
192
  }
193
193
 
194
194
  vector<const PhysicalOperator *> PhysicalRecursiveCTE::GetSources() const {
@@ -1,46 +1,17 @@
1
1
  #include "duckdb/execution/partitionable_hashtable.hpp"
2
2
 
3
- namespace duckdb {
4
-
5
- static idx_t PartitionInfoNPartitions(const idx_t n_partitions_upper_bound) {
6
- idx_t n_partitions = 1;
7
- while (n_partitions <= n_partitions_upper_bound / 2) {
8
- n_partitions *= 2;
9
- if (n_partitions >= 256) {
10
- break;
11
- }
12
- }
13
- return n_partitions;
14
- }
15
-
16
- static idx_t PartitionInfoRadixBits(const idx_t n_partitions) {
17
- idx_t radix_bits = 0;
18
- auto radix_partitions_copy = n_partitions;
19
- while (radix_partitions_copy - 1) {
20
- radix_bits++;
21
- radix_partitions_copy >>= 1;
22
- }
23
- return radix_bits;
24
- }
3
+ #include "duckdb/common/radix_partitioning.hpp"
25
4
 
26
- static hash_t PartitionInfoRadixMask(const idx_t radix_bits, const idx_t radix_shift) {
27
- hash_t radix_mask = 0;
28
- // we use the fifth byte of the 64 bit hash as radix source
29
- for (idx_t i = 0; i < radix_bits; i++) {
30
- radix_mask = (radix_mask << 1) | 1;
31
- }
32
- radix_mask <<= radix_shift;
33
- return radix_mask;
34
- }
5
+ namespace duckdb {
35
6
 
36
7
  RadixPartitionInfo::RadixPartitionInfo(const idx_t n_partitions_upper_bound)
37
- : n_partitions(PartitionInfoNPartitions(n_partitions_upper_bound)),
38
- radix_bits(PartitionInfoRadixBits(n_partitions)), radix_mask(PartitionInfoRadixMask(radix_bits, RADIX_SHIFT)) {
8
+ : n_partitions(PreviousPowerOfTwo(n_partitions_upper_bound)),
9
+ radix_bits(RadixPartitioning::RadixBits(n_partitions)), radix_mask(RadixPartitioning::Mask(radix_bits)),
10
+ radix_shift(RadixPartitioning::Shift(radix_bits)) {
39
11
 
40
- // finalize_threads needs to be a power of 2
41
12
  D_ASSERT(n_partitions > 0);
42
13
  D_ASSERT(n_partitions <= 256);
43
- D_ASSERT((n_partitions & (n_partitions - 1)) == 0);
14
+ D_ASSERT(IsPowerOfTwo(n_partitions));
44
15
  D_ASSERT(radix_bits <= 8);
45
16
  }
46
17
 
@@ -80,7 +51,7 @@ idx_t PartitionableHashTable::ListAddChunk(HashTableList &list, DataChunk &group
80
51
  DataChunk &payload, const vector<idx_t> &filter) {
81
52
  // If this is false, a single AddChunk would overflow the max capacity
82
53
  D_ASSERT(list.empty() || groups.size() <= list.back()->MaxCapacity());
83
- if (list.empty() || list.back()->Size() + groups.size() >= list.back()->MaxCapacity()) {
54
+ if (list.empty() || list.back()->Count() + groups.size() >= list.back()->MaxCapacity()) {
84
55
  idx_t new_capacity = GroupedAggregateHashTable::InitialCapacity();
85
56
  if (!list.empty()) {
86
57
  new_capacity = list.back()->Capacity();
@@ -159,7 +130,7 @@ void PartitionableHashTable::Partition() {
159
130
  context, allocator, group_types, payload_types, bindings, GetHTEntrySize()));
160
131
  partition_hts[r] = radix_partitioned_hts[r].back().get();
161
132
  }
162
- unpartitioned_ht->Partition(partition_hts, partition_info.radix_mask, partition_info.RADIX_SHIFT);
133
+ unpartitioned_ht->Partition(partition_hts, partition_info.radix_bits);
163
134
  unpartitioned_ht.reset();
164
135
  }
165
136
  unpartitioned_hts.clear();
@@ -176,6 +147,7 @@ HashTableList PartitionableHashTable::GetPartition(idx_t partition) {
176
147
  D_ASSERT(radix_partitioned_hts.size() > partition);
177
148
  return std::move(radix_partitioned_hts[partition]);
178
149
  }
150
+
179
151
  HashTableList PartitionableHashTable::GetUnpartitioned() {
180
152
  D_ASSERT(!IsPartitioned());
181
153
  return std::move(unpartitioned_hts);
@@ -138,7 +138,7 @@ void PhysicalOperator::BuildPipelines(Pipeline &current, MetaPipeline &meta_pipe
138
138
 
139
139
  // we create a new pipeline starting from the child
140
140
  auto child_meta_pipeline = meta_pipeline.CreateChildMetaPipeline(current, this);
141
- child_meta_pipeline->Build(children[0].get());
141
+ child_meta_pipeline->Build(*children[0]);
142
142
  } else {
143
143
  // operator is not a sink! recurse in children
144
144
  if (children.empty()) {
@@ -19,12 +19,8 @@
19
19
 
20
20
  namespace duckdb {
21
21
 
22
- static bool CanPlanIndexJoin(ClientContext &context, TableScanBindData *bind_data, PhysicalTableScan &scan) {
23
- if (!bind_data) {
24
- // not a table scan
25
- return false;
26
- }
27
- auto table = bind_data->table;
22
+ static bool CanPlanIndexJoin(ClientContext &context, TableScanBindData &bind_data, PhysicalTableScan &scan) {
23
+ auto table = bind_data.table;
28
24
  auto &transaction = DuckTransaction::Get(context, *table->catalog);
29
25
  auto &local_storage = LocalStorage::Get(transaction);
30
26
  if (local_storage.Find(table->GetStoragePtr())) {
@@ -139,21 +135,23 @@ void CheckForPerfectJoinOpt(LogicalComparisonJoin &op, PerfectHashJoinStats &joi
139
135
  return;
140
136
  }
141
137
 
142
- static void CanUseIndexJoin(TableScanBindData *tbl, Expression &expr, Index **result_index) {
143
- tbl->table->GetStorage().info->indexes.Scan([&](Index &index) {
138
+ static optional_ptr<Index> CanUseIndexJoin(TableScanBindData &tbl, Expression &expr) {
139
+ optional_ptr<Index> result;
140
+ tbl.table->GetStorage().info->indexes.Scan([&](Index &index) {
144
141
  if (index.unbound_expressions.size() != 1) {
145
142
  return false;
146
143
  }
147
144
  if (expr.alias == index.unbound_expressions[0]->alias) {
148
- *result_index = &index;
145
+ result = &index;
149
146
  return true;
150
147
  }
151
148
  return false;
152
149
  });
150
+ return result;
153
151
  }
154
152
 
155
- Index *CheckIndexJoin(ClientContext &context, LogicalComparisonJoin &op, PhysicalOperator &plan,
156
- Expression &condition) {
153
+ optional_ptr<Index> CheckIndexJoin(ClientContext &context, LogicalComparisonJoin &op, PhysicalOperator &plan,
154
+ Expression &condition) {
157
155
  if (op.type == LogicalOperatorType::LOGICAL_DELIM_JOIN) {
158
156
  return nullptr;
159
157
  }
@@ -169,17 +167,20 @@ Index *CheckIndexJoin(ClientContext &context, LogicalComparisonJoin &op, Physica
169
167
  return nullptr;
170
168
  }
171
169
  auto &tbl_scan = plan.Cast<PhysicalTableScan>();
172
- auto tbl = dynamic_cast<TableScanBindData *>(tbl_scan.bind_data.get());
173
- Index *result = nullptr;
174
- if (CanPlanIndexJoin(context, tbl, tbl_scan)) {
175
- CanUseIndexJoin(tbl, condition, &result);
170
+ auto tbl_data = dynamic_cast<TableScanBindData *>(tbl_scan.bind_data.get());
171
+ if (!tbl_data) {
172
+ return nullptr;
173
+ }
174
+ optional_ptr<Index> result;
175
+ if (CanPlanIndexJoin(context, *tbl_data, tbl_scan)) {
176
+ result = CanUseIndexJoin(*tbl_data, condition);
176
177
  }
177
178
  return result;
178
179
  }
179
180
 
180
181
  static bool PlanIndexJoin(ClientContext &context, LogicalComparisonJoin &op, unique_ptr<PhysicalOperator> &plan,
181
- unique_ptr<PhysicalOperator> &left, unique_ptr<PhysicalOperator> &right, Index *index,
182
- bool swap_condition = false) {
182
+ unique_ptr<PhysicalOperator> &left, unique_ptr<PhysicalOperator> &right,
183
+ optional_ptr<Index> index, bool swap_condition = false) {
183
184
  if (!index) {
184
185
  return false;
185
186
  }
@@ -205,7 +206,7 @@ static bool PlanIndexJoin(ClientContext &context, LogicalComparisonJoin &op, uni
205
206
  swap(op.left_projection_map, op.right_projection_map);
206
207
  }
207
208
  plan = make_uniq<PhysicalIndexJoin>(op, std::move(left), std::move(right), std::move(op.conditions), op.join_type,
208
- op.left_projection_map, op.right_projection_map, tbl_scan.column_ids, index,
209
+ op.left_projection_map, op.right_projection_map, tbl_scan.column_ids, *index,
209
210
  !swap_condition, op.estimated_cardinality);
210
211
  return true;
211
212
  }
@@ -16,7 +16,8 @@ unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalCopyToFile
16
16
  auto copy = make_uniq<PhysicalCopyToFile>(op.types, op.function, std::move(op.bind_data), op.estimated_cardinality);
17
17
  copy->file_path = op.file_path;
18
18
  copy->use_tmp_file = op.use_tmp_file;
19
- copy->allow_overwrite = op.allow_overwrite;
19
+ copy->overwrite_or_ignore = op.overwrite_or_ignore;
20
+ copy->filename_pattern = op.filename_pattern;
20
21
  copy->per_thread_output = op.per_thread_output;
21
22
  copy->partition_output = op.partition_output;
22
23
  copy->partition_columns = op.partition_columns;
@@ -8,13 +8,13 @@ unique_ptr<PhysicalOperator> PhysicalPlanGenerator::CreatePlan(LogicalExecute &o
8
8
  if (!op.prepared->plan) {
9
9
  D_ASSERT(op.children.size() == 1);
10
10
  auto owned_plan = CreatePlan(*op.children[0]);
11
- auto execute = make_uniq<PhysicalExecute>(owned_plan.get());
11
+ auto execute = make_uniq<PhysicalExecute>(*owned_plan);
12
12
  execute->owned_plan = std::move(owned_plan);
13
13
  execute->prepared = std::move(op.prepared);
14
14
  return std::move(execute);
15
15
  } else {
16
16
  D_ASSERT(op.children.size() == 0);
17
- return make_uniq<PhysicalExecute>(op.prepared->plan.get());
17
+ return make_uniq<PhysicalExecute>(*op.prepared->plan);
18
18
  }
19
19
  }
20
20
 
@@ -1,11 +1,10 @@
1
- #include "duckdb/execution/physical_plan_generator.hpp"
2
- #include "duckdb/planner/operator/logical_explain.hpp"
1
+ #include "duckdb/common/tree_renderer.hpp"
2
+ #include "duckdb/common/types/column/column_data_collection.hpp"
3
3
  #include "duckdb/execution/operator/helper/physical_explain_analyze.hpp"
4
- #include "duckdb/main/client_context.hpp"
5
- #include "duckdb/common/types/column_data_collection.hpp"
6
4
  #include "duckdb/execution/operator/scan/physical_column_data_scan.hpp"
7
-
8
- #include "duckdb/common/tree_renderer.hpp"
5
+ #include "duckdb/execution/physical_plan_generator.hpp"
6
+ #include "duckdb/main/client_context.hpp"
7
+ #include "duckdb/planner/operator/logical_explain.hpp"
9
8
 
10
9
  namespace duckdb {
11
10
 
@@ -1,8 +1,8 @@
1
+ #include "duckdb/common/types/column/column_data_collection.hpp"
2
+ #include "duckdb/execution/operator/scan/physical_column_data_scan.hpp"
1
3
  #include "duckdb/execution/operator/scan/physical_expression_scan.hpp"
2
4
  #include "duckdb/execution/physical_plan_generator.hpp"
3
5
  #include "duckdb/planner/operator/logical_expression_get.hpp"
4
- #include "duckdb/execution/operator/scan/physical_column_data_scan.hpp"
5
- #include "duckdb/common/types/column_data_collection.hpp"
6
6
 
7
7
  namespace duckdb {
8
8
 
@@ -1,10 +1,10 @@
1
- #include "duckdb/execution/operator/set/physical_recursive_cte.hpp"
1
+ #include "duckdb/common/types/column/column_data_collection.hpp"
2
2
  #include "duckdb/execution/operator/scan/physical_column_data_scan.hpp"
3
+ #include "duckdb/execution/operator/set/physical_recursive_cte.hpp"
3
4
  #include "duckdb/execution/physical_plan_generator.hpp"
4
5
  #include "duckdb/planner/expression/bound_reference_expression.hpp"
5
- #include "duckdb/planner/operator/logical_recursive_cte.hpp"
6
6
  #include "duckdb/planner/operator/logical_cteref.hpp"
7
- #include "duckdb/common/types/column_data_collection.hpp"
7
+ #include "duckdb/planner/operator/logical_recursive_cte.hpp"
8
8
 
9
9
  namespace duckdb {
10
10
 
@@ -1,7 +1,7 @@
1
1
  #include "duckdb/execution/physical_plan_generator.hpp"
2
2
 
3
3
  #include "duckdb/catalog/catalog_entry/scalar_function_catalog_entry.hpp"
4
- #include "duckdb/common/types/column_data_collection.hpp"
4
+ #include "duckdb/common/types/column/column_data_collection.hpp"
5
5
  #include "duckdb/execution/column_binding_resolver.hpp"
6
6
  #include "duckdb/main/client_context.hpp"
7
7
  #include "duckdb/main/config.hpp"