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
@@ -0,0 +1,170 @@
1
+ #include "duckdb/common/types/row/tuple_data_segment.hpp"
2
+
3
+ #include "duckdb/common/types/row/tuple_data_allocator.hpp"
4
+
5
+ namespace duckdb {
6
+
7
+ TupleDataChunkPart::TupleDataChunkPart() {
8
+ }
9
+
10
+ void SwapTupleDataChunkPart(TupleDataChunkPart &a, TupleDataChunkPart &b) {
11
+ std::swap(a.row_block_index, b.row_block_index);
12
+ std::swap(a.row_block_offset, b.row_block_offset);
13
+ std::swap(a.heap_block_index, b.heap_block_index);
14
+ std::swap(a.heap_block_offset, b.heap_block_offset);
15
+ std::swap(a.base_heap_ptr, b.base_heap_ptr);
16
+ std::swap(a.total_heap_size, b.total_heap_size);
17
+ std::swap(a.count, b.count);
18
+ // Cannot swap the lock, but not needed as move constructor only happens during append, lock only needed for scans
19
+ }
20
+
21
+ TupleDataChunkPart::TupleDataChunkPart(TupleDataChunkPart &&other) noexcept {
22
+ SwapTupleDataChunkPart(*this, other);
23
+ }
24
+
25
+ TupleDataChunkPart &TupleDataChunkPart::operator=(TupleDataChunkPart &&other) noexcept {
26
+ SwapTupleDataChunkPart(*this, other);
27
+ return *this;
28
+ }
29
+
30
+ TupleDataChunk::TupleDataChunk() : count(0) {
31
+ }
32
+
33
+ static inline void SwapTupleDataChunk(TupleDataChunk &a, TupleDataChunk &b) noexcept {
34
+ std::swap(a.parts, b.parts);
35
+ std::swap(a.row_block_ids, b.row_block_ids);
36
+ std::swap(a.heap_block_ids, b.heap_block_ids);
37
+ std::swap(a.count, b.count);
38
+ }
39
+
40
+ TupleDataChunk::TupleDataChunk(TupleDataChunk &&other) noexcept {
41
+ SwapTupleDataChunk(*this, other);
42
+ }
43
+
44
+ TupleDataChunk &TupleDataChunk::operator=(TupleDataChunk &&other) noexcept {
45
+ SwapTupleDataChunk(*this, other);
46
+ return *this;
47
+ }
48
+
49
+ void TupleDataChunk::AddPart(TupleDataChunkPart &&part, const TupleDataLayout &layout) {
50
+ count += part.count;
51
+ row_block_ids.insert(part.row_block_index);
52
+ if (!layout.AllConstant() && part.total_heap_size > 0) {
53
+ heap_block_ids.insert(part.heap_block_index);
54
+ }
55
+ parts.emplace_back(std::move(part));
56
+ }
57
+
58
+ void TupleDataChunk::Verify() const {
59
+ #ifdef DEBUG
60
+ idx_t total_count = 0;
61
+ for (const auto &part : parts) {
62
+ total_count += part.count;
63
+ }
64
+ D_ASSERT(this->count == total_count);
65
+ D_ASSERT(this->count <= STANDARD_VECTOR_SIZE);
66
+ #endif
67
+ }
68
+
69
+ void TupleDataChunk::MergeLastChunkPart(const TupleDataLayout &layout) {
70
+ if (parts.size() < 2) {
71
+ return;
72
+ }
73
+
74
+ auto &second_to_last = parts[parts.size() - 2];
75
+ auto &last = parts[parts.size() - 1];
76
+
77
+ auto rows_align =
78
+ last.row_block_index == second_to_last.row_block_index &&
79
+ last.row_block_offset == second_to_last.row_block_offset + second_to_last.count * layout.GetRowWidth();
80
+
81
+ if (!rows_align) { // If rows don't align we can never merge
82
+ return;
83
+ }
84
+
85
+ if (layout.AllConstant()) { // No heap and rows align - merge
86
+ second_to_last.count += last.count;
87
+ parts.pop_back();
88
+ return;
89
+ }
90
+
91
+ if (last.heap_block_index == second_to_last.heap_block_index &&
92
+ last.heap_block_offset == second_to_last.heap_block_index + second_to_last.total_heap_size &&
93
+ last.base_heap_ptr == second_to_last.base_heap_ptr) { // There is a heap and it aligns - merge
94
+ second_to_last.total_heap_size += last.total_heap_size;
95
+ second_to_last.count += last.count;
96
+ parts.pop_back();
97
+ }
98
+ }
99
+
100
+ TupleDataSegment::TupleDataSegment(shared_ptr<TupleDataAllocator> allocator_p)
101
+ : allocator(std::move(allocator_p)), count(0) {
102
+ }
103
+
104
+ TupleDataSegment::~TupleDataSegment() {
105
+ lock_guard<mutex> guard(pinned_handles_lock);
106
+ pinned_row_handles.clear();
107
+ pinned_heap_handles.clear();
108
+ allocator = nullptr;
109
+ }
110
+
111
+ void SwapTupleDataSegment(TupleDataSegment &a, TupleDataSegment &b) {
112
+ std::swap(a.allocator, b.allocator);
113
+ std::swap(a.chunks, b.chunks);
114
+ std::swap(a.count, b.count);
115
+ std::swap(a.pinned_row_handles, b.pinned_row_handles);
116
+ std::swap(a.pinned_heap_handles, b.pinned_heap_handles);
117
+ }
118
+
119
+ TupleDataSegment::TupleDataSegment(TupleDataSegment &&other) noexcept {
120
+ SwapTupleDataSegment(*this, other);
121
+ }
122
+
123
+ TupleDataSegment &TupleDataSegment::operator=(TupleDataSegment &&other) noexcept {
124
+ SwapTupleDataSegment(*this, other);
125
+ return *this;
126
+ }
127
+
128
+ idx_t TupleDataSegment::ChunkCount() const {
129
+ return chunks.size();
130
+ }
131
+
132
+ idx_t TupleDataSegment::SizeInBytes() const {
133
+ const auto &layout = allocator->GetLayout();
134
+ idx_t total_size = 0;
135
+ for (const auto &chunk : chunks) {
136
+ total_size += chunk.count * layout.GetRowWidth();
137
+ if (!layout.AllConstant()) {
138
+ for (const auto &part : chunk.parts) {
139
+ total_size += part.total_heap_size;
140
+ }
141
+ }
142
+ }
143
+ return total_size;
144
+ }
145
+
146
+ void TupleDataSegment::Unpin() {
147
+ lock_guard<mutex> guard(pinned_handles_lock);
148
+ pinned_row_handles.clear();
149
+ pinned_heap_handles.clear();
150
+ }
151
+
152
+ void TupleDataSegment::Verify() const {
153
+ #ifdef DEBUG
154
+ idx_t total_count = 0;
155
+ for (const auto &chunk : chunks) {
156
+ chunk.Verify();
157
+ total_count += chunk.count;
158
+ }
159
+ D_ASSERT(total_count == this->count);
160
+ #endif
161
+ }
162
+
163
+ void TupleDataSegment::VerifyEverythingPinned() const {
164
+ #ifdef DEBUG
165
+ D_ASSERT(pinned_row_handles.size() == allocator->RowBlockCount());
166
+ D_ASSERT(pinned_heap_handles.size() == allocator->HeapBlockCount());
167
+ #endif
168
+ }
169
+
170
+ } // namespace duckdb
@@ -1351,7 +1351,7 @@ void Vector::Verify(Vector &vector_p, const SelectionVector &sel_p, idx_t count)
1351
1351
  if (vtype != VectorType::FLAT_VECTOR) {
1352
1352
  continue;
1353
1353
  }
1354
- ValidityMask *child_validity;
1354
+ optional_ptr<ValidityMask> child_validity;
1355
1355
  SelectionVector owned_child_sel;
1356
1356
  const SelectionVector *child_sel = &owned_child_sel;
1357
1357
  if (children[child_idx]->GetVectorType() == VectorType::FLAT_VECTOR) {