HaoYang670 commented on code in PR #2127:
URL: https://github.com/apache/arrow-rs/pull/2127#discussion_r927442330


##########
arrow/src/array/builder/boolean_builder.rs:
##########
@@ -85,17 +84,19 @@ impl BooleanBuilder {
     #[inline]
     pub fn append_value(&mut self, v: bool) {
         self.values_builder.append(v);
-        if let Some(b) = self.bitmap_builder.as_mut() {
-            b.append(true)
-        }
+        self.null_buffer_builder.append_n_true(1);
     }
 
     /// Appends a null slot into the builder
     #[inline]
     pub fn append_null(&mut self) {
-        self.materialize_bitmap_builder();
-        self.bitmap_builder.as_mut().unwrap().append(false);
-        self.values_builder.advance(1);
+        self.append_nulls(1)
+    }
+
+    #[inline]
+    pub fn append_nulls(&mut self, n: usize) {

Review Comment:
   Added!



-- 
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