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

   **Describe the bug**
   `RowConverter::convert_rows` always decodes `List(Null)` as empty lists. 
   
   **To Reproduce**
   ```rust
   let mut builder = GenericListBuilder::<O, _>::new(NullBuilder::new());
   builder.values().append_nulls(0);
   builder.append(true);
   builder.append(false);
   builder.values().append_nulls(2);
   builder.append(true);
   
   let list = Arc::new(builder.finish()) as ArrayRef;
   let d = list.data_type().clone();
   
   let converter = RowConverter::new(vec![SortField::new(d.clone())]).unwrap();
   
   let rows = converter.convert_columns(&[Arc::clone(&list)]).unwrap();
   assert!(rows.row(0) > rows.row(1)); // [null] > null
   assert!(rows.row(0) < rows.row(2)); // [null] < [null, null]
   assert!(rows.row(1) < rows.row(2)); // null < [null, null]
   
   let back = converter.convert_rows(&rows).unwrap();
   assert_eq!(back.len(), 1);
   back[0].to_data().validate_full().unwrap();
   assert_eq!(&back[0], &list);
   ```
   
   Adding the above code to `test_single_list` in `arrow-row/src/lib.rs` causes 
a test failure:
   
   ```
   thread 'tests::test_list' panicked at arrow-row/src/lib.rs:2111:9:
   assertion `left == right` failed
     left: ListArray
   [
     NullArray(0),
     null,
     NullArray(0),
   ]
    right: ListArray
   [
     NullArray(0),
     null,
     NullArray(2),
   ]
   ```
   
   **Expected behavior**
   Not panicking
   
   **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