bjchambers opened a new issue #1049:
URL: https://github.com/apache/arrow-rs/issues/1049


   **Describe the bug**
   
   ```
   #[test]
   fn test_take_slice_string() {
       let strings =
           StringArray::from(vec![Some("hello"), None, Some("world"), None, 
Some("hi")]);
       let indices = Int32Array::from(vec![Some(0), Some(1), None, Some(0), 
Some(2)]);
       let indices_slice = indices.slice(1, 4);
       let indices_slice = indices_slice
           .as_ref()
           .as_any()
           .downcast_ref::<Int32Array>()
           .unwrap();
   
       let expected = StringArray::from(vec![None, None, Some("hello"), 
Some("world")]);
       let result = take(&strings, indices_slice, None).unwrap();
       assert_eq!(result.as_ref(), &expected);
   }
   ```
   
   ```
   thread 'compute::kernels::take::tests::test_take_slice_string' panicked at 
'assertion failed: `(left == right)`
     left: `StringArray
   [
     null,
     null,
     null,
     "world",
   ]`,
    right: `StringArray
   [
     null,
     null,
     "hello",
     "world",
   ]`', arrow/src/compute/kernels/take.rs:1950:9
   ```
   
   **To Reproduce**
   
   See test. It looks like the null bits aren't being properly shifted when 
used in the take kernel.
   
   **Expected behavior**
   
   Test passes.
   
   **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