kawadakk opened a new issue, #7168:
URL: https://github.com/apache/arrow-rs/issues/7168
**Describe the bug**
`RowConverter::convert_columns` panics when encoding an array of type
`Struct([])`.
**To Reproduce**
```rust
#[test]
fn test_unit_struct() {
let s = Arc::new(StructArray::new_empty_fields(5, None)) as ArrayRef;
let sort_fields = vec![SortField::new(s.data_type().clone())];
let converter = RowConverter::new(sort_fields).unwrap();
let r = converter.convert_columns(&[Arc::clone(&s)]).unwrap();
let back = converter.convert_rows(&r).unwrap();
assert_eq!(back.len(), 1);
assert_eq!(&back[0], &s);
}
```
```
thread 'tests::test_unit_struct' panicked at arrow-row/src/lib.rs:881:9:
assertion failed: row + 1 < self.offsets.len()
```
**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]