Jefffrey commented on code in PR #7089: URL: https://github.com/apache/arrow-rs/pull/7089#discussion_r1946227783
########## arrow-buffer/src/builder/boolean.rs: ########## @@ -83,7 +83,23 @@ impl BooleanBufferBuilder { self.len == 0 } - /// Returns the capacity of the buffer + /// Returns the capacity of the buffer, in bits (not bytes) + /// + /// Note this + /// + /// # Example + /// ``` + /// # use arrow_buffer::builder::BooleanBufferBuilder; + /// // empty requires 0 bytes + /// let b = BooleanBufferBuilder::new(0); + /// assert_eq!(0, b.capacity()); + /// // Creating space for 1 bit results in 64 bytes (space for 512 bits) Review Comment: Maybe add a small note here explaining why it over allocates? -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org