Chen-Yuan-Lai commented on code in PR #7013:
URL: https://github.com/apache/arrow-rs/pull/7013#discussion_r1929823366


##########
arrow-buffer/src/builder/null.rs:
##########
@@ -134,6 +133,42 @@ impl NullBufferBuilder {
         }
     }
 
+    /// Returns the capacity of the buffer
+    #[inline]
+    pub fn capacity(&self) -> usize {
+        if let Some(buf) = self.bitmap_builder.as_ref() {
+            buf.capacity()
+        } else {
+            0

Review Comment:
   Or rename `capacity` field to `initial_capacity` or `initial_bits`  to 
clearly indicate this is for initialization only?
   ```
   pub fn new(capacity: usize) -> Self {
         Self {
             bitmap_builder: None,
             len: 0,
             initial_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