Rich-T-kid commented on PR #12268:
URL: https://github.com/apache/arrow-rs/pull/12268#issuecomment-7000439388
One thing I noticed: this only unslices top-level RunEndEncoded columns. A
nested run array, for example `List<RunEndEncoded<Int32, Utf8View>>`, still
hits the same variadic-count mismatch because `write_array_data` unslices the
nested run array but `append_variadic_buffer_counts` walks the original nested
child.
This could be handled here, or in a follow-up since the reported cases are
all top-level RunEndEncoded arrays — up to you. Here's a regression test that
reproduces it:
```rust
#[test]
fn test_roundtrip_stream_zero_rows_list_of_run_array_utf8_view() {
let values = StringViewArray::from(vec!["a long string that is not
inlined", "b"]);
let ree =
RunArray::<Int32Type>::try_new(&Int32Array::from(vec![1, 2]),
&values).unwrap();
let field = Arc::new(Field::new_list_field(ree.data_type().clone(),
true));
let list = ListArray::new(
field,
OffsetBuffer::new(vec![0_i32, 2].into()),
Arc::new(ree),
None,
);
let batch = RecordBatch::try_from_iter([("a", Arc::new(list) as
ArrayRef)])
.unwrap()
.slice(0, 0);
let output = roundtrip_ipc_stream(&batch);
assert_eq!(output.num_rows(), 0);
}
```
On the current branch this fails with `Invalid variadic count 1 for Utf8View
column, with 2 buffer(s) left in the message`.
--
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]