You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Jefffrey (via GitHub)" <gi...@apache.org> on 2026/09/18 01:33:45 UTC
Re: [PR] feat(fixed-sized-binary builder): introduce capacity [arrow-rs]
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org