alamb commented on code in PR #9275:
URL: https://github.com/apache/arrow-rs/pull/9275#discussion_r2746894502
##########
arrow-row/src/list.rs:
##########
@@ -30,19 +30,30 @@ pub fn compute_lengths<O: OffsetSizeTrait>(
let offsets = array.value_offsets().windows(2);
let mut rows_length_iter = rows.lengths();
+ // Check if child is Null type - if so, we need special handling
Review Comment:
I still think special casing DataType::Null (only for) lists seems wrong to
me. For example, now that we just added support for ListView in
https://github.com/apache/arrow-rs/pull/9176 we would have to do something
similar there too. Also, perhaps for Maps and Structs?
I think maybe the problem is that required because DataType::Null is a
special case -- specifically it looks like it is not explicitly encoded in the
Row format:
https://github.com/apache/arrow-rs/blob/05cb6b00667b123162b252906e3f3ffc6bc99f9e/arrow-row/src/lib.rs#L1676-L1675
And then lists have an empty byte array at the end:
https://github.com/apache/arrow-rs/blob/05cb6b00667b123162b252906e3f3ffc6bc99f9e/arrow-row/src/lib.rs#L342-L344
Would it be better instead to explicitly encode the length / a different
sentinel somehow to end all lists?
--
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]