Commit 0673088
committed
fix: account for initial hash table allocation in ArrowBytesMap/ArrowBytesViewMap
ArrowBytesMap and ArrowBytesViewMap initialize their hash table with
with_capacity(INITIAL_MAP_CAPACITY) but set map_size to 0. The
insert_accounted method only tracks incremental growth beyond the
current capacity, so the initial allocation is never counted in
size() — understating memory usage.
Initialize map_size with map.allocation_size() to capture the
pre-allocated memory.1 parent 2aab559 commit 0673088
File tree
2 files changed
+8
-4
lines changed- datafusion/physical-expr-common/src
2 files changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
247 | 249 | | |
248 | 250 | | |
249 | | - | |
250 | | - | |
| 251 | + | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
253 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
158 | 160 | | |
159 | 161 | | |
160 | | - | |
161 | | - | |
| 162 | + | |
| 163 | + | |
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
| |||
0 commit comments