I think this should use https://docs.rs/arrow/latest/arrow/array/struct.NullBufferBuilder.html#method.allocated_size as it is meant to track the allocated size (not the used size) _Originally posted by @alamb in https://github.com/apache/datafusion/pull/20064#discussion_r2745871264_