viirya commented on code in PR #1602:
URL: https://github.com/apache/arrow-rs/pull/1602#discussion_r854358105
##########
arrow/src/array/array_list.rs:
##########
@@ -524,6 +516,32 @@ mod tests {
assert_eq!(list_array, another)
}
+ #[test]
+ fn test_empty_list_array() {
+ // Construct an empty value array
+ let value_data = ArrayData::builder(DataType::Int32)
+ .len(0)
+ .add_buffer(Buffer::from_iter(std::iter::empty::<i32>()))
Review Comment:
Hmm, I don't see C++ ListArray checks first slot in offsets, but it checks
the length of offsets:
https://github.com/apache/arrow/blob/c70426f73326b3852d1bd7c31d98be4743f3fcba/cpp/src/arrow/array/array_nested.cc#L111-L113
Seems it requires offsets to have non-zero length?
--
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]