Weijun-H opened a new issue, #10341:
URL: https://github.com/apache/arrow-rs/issues/10341

   Some downstream consumers need to account for memory retained by Arrow array 
builders while rows are still being appended. Existing builder slice accessors 
expose initialized data, but not the underlying allocated capacity retained by 
values, offsets, or validity buffers.
   
   For memory accounting, using initialized lengths can undercount allocation 
slack after buffer growth. Exposing read-only capacity accessors for the 
existing builder buffers would let downstream code measure retained builder 
capacity without changing append, reserve, finish, or resize behavior.
   
   The proposed API surface is limited to read-only accessors on existing 
builders:
   
   - `GenericByteBuilder::{values_capacity, offsets_capacity, 
validity_capacity}`
   - `GenericListBuilder::{offsets_capacity, validity_capacity}`
   - `PrimitiveBuilder::validity_capacity`
   - `StructBuilder::validity_capacity`
   


-- 
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