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


##########
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:
   I thought about this, but we also need to handle the indices being null. So 
I think we'd need to perform an AND operation between the result of `take_bits` 
on the list's null buffer and the indices null buffer. And that seemed a bit 
more complex.



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