Commit dab903e
Improve memory accounting for ArrowBytesViewMap (#20077)
## Which issue does this PR close?
- Closes #20074
## Rationale for this change
ArrowBytesViewMap was previously accounting for the logical number of
null bits when reporting memory usage. This under-reported memory
consumption is because NullBufferBuilder may allocate more memory than
is currently used.
Memory accounting in DataFusion is expected to reflect allocated memory
rather than logical usage to ensure accurate memory tracking.
## What changes are included in this PR?
- Update ArrowBytesViewMap::size to use
NullBufferBuilder::allocated_size instead of calculating size from the
number of used null bits.
## Are these changes tested?
- Yes. Existing tests were run:
- cargo test -p datafusion-physical-expr-common
## Are there any user-facing changes?
- No. This change only affects internal memory accounting and does not
alter query behavior or public APIs.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 030621c commit dab903e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
| 440 | + | |
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| |||
0 commit comments