Commit f0de02f
Use BooleanBufferBuilder rather than Vec<bool> in ArrowBytesViewMap (#20064)
## Which issue does this PR close?
Closes #20053
## Rationale for this change
`ArrowBytesViewMap` previously used `Vec<bool>` to track null values.
This PR replaces it with `BooleanBufferBuilder`, which is significantly
more
memory-efficient and faster, and aligns with Apache Arrow best practices
for
building validity bitmaps.
This change improves performance and memory usage without changing
behavior.
## What changed
- Replaced `Vec<bool>` with `BooleanBufferBuilder` for null tracking
- Updated null buffer construction to use Arrow-native buffers
- Kept ordering and semantics unchanged
## Tests
- `cargo test -p datafusion-physical-expr-common`
> Note: Full workspace tests require `protoc`; this PR was validated
with the affected crate tests.
https://github.com/user-attachments/assets/88b1af34-a905-43bd-b9e9-065858d0781d
---------
Co-authored-by: Eesh Sagar Singh <etk18@Eeshs-MacBook-Air.local>
Co-authored-by: Daniël Heres <danielheres@gmail.com>1 parent 7c3ea05 commit f0de02f
1 file changed
Lines changed: 8 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | | - | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
284 | | - | |
| 285 | + | |
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
| |||
371 | 372 | | |
372 | 373 | | |
373 | 374 | | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
| 375 | + | |
384 | 376 | | |
385 | 377 | | |
386 | 378 | | |
| |||
420 | 412 | | |
421 | 413 | | |
422 | 414 | | |
423 | | - | |
| 415 | + | |
424 | 416 | | |
425 | 417 | | |
426 | 418 | | |
| |||
445 | 437 | | |
446 | 438 | | |
447 | 439 | | |
448 | | - | |
| 440 | + | |
449 | 441 | | |
450 | 442 | | |
451 | 443 | | |
| |||
0 commit comments