andygrove commented on a change in pull request #8118:
URL: https://github.com/apache/arrow/pull/8118#discussion_r492065611



##########
File path: rust/arrow/src/array/array.rs
##########
@@ -834,7 +840,7 @@ impl From<Vec<Option<bool>>> for BooleanArray {
     fn from(data: Vec<Option<bool>>) -> Self {
         let data_len = data.len();
         let num_byte = bit_util::ceil(data_len, 8);
-        let mut null_buf = MutableBuffer::new(num_byte).with_bitset(num_byte, 
false);
+        let mut null_buf = make_null_buffer(data.len());
         let mut val_buf = MutableBuffer::new(num_byte).with_bitset(num_byte, 
false);

Review comment:
       Shouldn't `val_buf` also be initialized by calling `make_null_buffer`?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to