tustvold opened a new issue, #4404:
URL: https://github.com/apache/arrow-rs/issues/4404

   **Describe the bug**
   <!--
   A clear and concise description of what the bug is.
   -->
   
   `take_indices_nulls` uses the wrong index to inspect the null buffer, 
potentially resulting in panics for non-zero null indices.
   
   **To Reproduce**
   <!--
   Steps to reproduce the behavior:
   -->
   
   ```
   #[test]
   fn test_take_null_indices() {
       let indices = Int32Array::new(
           vec![1, 2, 400, 400].into(),
           Some(NullBuffer::from(vec![true, true, false, false])),
       );
       let values = Int32Array::from(vec![1, 23, 4, 5]);
       let r = take(&values, &indices, None).unwrap();
       let values = r
           .as_primitive::<Int32Type>()
           .into_iter()
           .collect::<Vec<_>>();
       assert_eq!(&values, &[Some(23), Some(4), None, None])
   }
   ```
   
   **Expected behavior**
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


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