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

   **Describe the bug**
   
   concatenating sliced `ListArrays` is broken
   
   
   **To Reproduce**
   This test which concatenates sliced list arrays should pass
   
   ```rust
   
       #[test]
       fn test_concat_primitive_list_arrays_slices() {
           let list1 = vec![
               Some(vec![Some(-1), Some(-1), Some(2), None, None]),
               Some(vec![]),  // In slice
               None, // In slice
               Some(vec![Some(10)]),
           ];
           let list1_array = ListArray::from_iter_primitive::<Int64Type, _, 
_>(list1.clone());
           let list1_array = list1_array.slice(1, 2);
           let list1_values = list1.into_iter().skip(1).take(2);
   
           let list2 = vec![
               None,
               Some(vec![Some(100), None, Some(101)]),
               Some(vec![Some(102)]),
           ];
           let list2_array = ListArray::from_iter_primitive::<Int64Type, _, 
_>(list2.clone());
   
           let array_result = concat(&[&list1_array, &list2_array]).unwrap();
   
           let expected = list1_values.chain(list2);
           let array_expected = ListArray::from_iter_primitive::<Int64Type, _, 
_>(expected);
   
           assert_eq!(array_result.as_ref(), &array_expected as &dyn Array);
       }
   ```
   
   **Expected behavior**
   Test should pass
   
   
   **Additional context**
   I found this while testing arrow 54.1.0 with DataFusion 
https://github.com/apache/datafusion/pull/14328#issuecomment-2616848309
   
   This regression was introduced in 
   - https://github.com/apache/arrow-rs/pull/6893
   
   The test case above
   * FAILS 
https://github.com/apache/arrow-rs/commit/27992680d5677b629d7b4ca11d3f94c2fe905f1a
 
   * PASSES at 
https://github.com/apache/arrow-rs/commit/debc5bf85729f7ebeb3789c6094a784abca95f73
 (one commit before)


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