alamb commented on code in PR #7419: URL: https://github.com/apache/arrow-rs/pull/7419#discussion_r2073611320
########## arrow-row/src/lib.rs: ########## @@ -2539,4 +2553,17 @@ mod tests { let rows = converter.convert_columns(&[Arc::new(a) as _]).unwrap(); assert_eq!(rows.row(0).cmp(&rows.row(1)), Ordering::Less); } + + #[test] + fn test_empty_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); Review Comment: I don't understand this test -- if the input array has 0 rows, shouldn't the output also have 0 rows? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org