wterrr opened a new pull request, #10519:
URL: https://github.com/apache/arrow-rs/pull/10519

   Closes #8230.
   
   ## Rationale
   
   `ArrayData::get_slice_memory_size` accounts for the fixed-width view buffer 
of `Utf8View` and `BinaryView` arrays, but previously omitted their variadic 
payload buffers.
   
   Slicing these arrays retains all payload buffers unchanged, so this could 
substantially underestimate the memory retained by the slice.
   
   ## Changes
   
   - Include the capacity of all trailing variadic payload buffers in 
`get_slice_memory_size`
   - Document the retained-buffer accounting behavior for variadic layouts
   - Add regression coverage for both `Utf8View` and `BinaryView`
   - Cover inline-only values, multiple payload buffers, and payload capacity 
greater than logical length
   
   ## Testing
   
   - `cargo test -p arrow-data --lib test_slice_memory_size`
   - `cargo test -p arrow-data --all-features`
   - `cargo clippy -p arrow-data --all-targets --all-features -- -D warnings`
   - `cargo fmt --all -- --check`
   
   All affected crate tests, doc tests, formatting, and focused Clippy checks 
pass.
   
   ## AI assistance
   
   Claude was used to help investigate the issue, draft the implementation and 
regression tests, and review the change. I reviewed the final change and take 
responsibility for the submitted code.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to