tustvold commented on code in PR #3473:
URL: https://github.com/apache/arrow-rs/pull/3473#discussion_r1063755012


##########
arrow-select/src/take.rs:
##########
@@ -850,6 +842,12 @@ where
     let mut current_offset = OffsetType::Native::zero();
     // add first offset
     new_offsets.push(OffsetType::Native::zero());
+
+    // Initialize null buffer
+    let num_bytes = bit_util::ceil(indices.len(), 8);
+    let mut null_buf = MutableBuffer::new(num_bytes).with_bitset(num_bytes, 
true);
+    let null_slice = null_buf.as_slice_mut();
+

Review Comment:
   Rather than moving this into this function, I think it might be faster and 
simpler to use `take_bits` on the list null buffer in the outer function. This 
would also resolve the type complexity issue above



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

Reply via email to