kawadakk opened a new issue, #7165:
URL: https://github.com/apache/arrow-rs/issues/7165
**Describe the bug**
`RowConverter::convert_rows` panics when decoding rows of type
`List(Dictionary(Int32, Int32))`.
**To Reproduce**
```rust
#[test]
fn test_list_of_primitive_dictionary() {
let mut builder =
ListBuilder::<PrimitiveDictionaryBuilder<Int32Type,
Int32Type>>::default();
builder.values().append(2).unwrap();
builder.values().append(3).unwrap();
builder.values().append(0).unwrap();
builder.values().append_null();
builder.values().append(5).unwrap();
builder.values().append(3).unwrap();
builder.values().append(-1).unwrap();
builder.append(true);
let a = Arc::new(builder.finish()) as ArrayRef;
let data_type = a.data_type().clone();
let field = SortField::new(data_type.clone());
let converter = RowConverter::new(vec![field]).unwrap();
let rows = converter.convert_columns(&[Arc::clone(&a)]).unwrap();
let back = converter.convert_rows(&rows).unwrap();
assert_eq!(back.len(), 1);
back[0].to_data().validate_full().unwrap();
assert_eq!(&back[0], &a);
}
```
```
thread 'tests::test_list_of_primitive_dictionary' panicked at
arrow-array/src/array/list_array.rs:429:14:
Expected infallible creation of GenericListArray from ArrayDataRef failed:
InvalidArgumentError("[Large]ListArray's child datatype Int32 does not
correspond to the List's datatype Dictionary(Int32, Int32)")
```
**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]