Jefffrey commented on code in PR #11127:
URL: https://github.com/apache/arrow-rs/pull/11127#discussion_r4042970307
##########
arrow-array/src/builder/fixed_size_binary_builder.rs:
##########
@@ -157,6 +157,10 @@ impl FixedSizeBinaryBuilder {
pub fn validity_slice(&self) -> Option<&[u8]> {
self.null_buffer_builder.as_slice()
}
+ /// Returns the total memory capacity in bytes currently
+ pub fn capacity(&self) -> usize {
+ self.values_builder.capacity() +
self.null_buffer_builder.allocated_size() + 4 // i32
Review Comment:
if we're gonna account for the 4 bytes of value length it raises the
question of if we should also account for pointers of `Vec` too 😅
but this is a minor thing anyway
--
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]