alamb opened a new issue, #1620: URL: https://github.com/apache/arrow-rs/issues/1620
Good idea checking the C++ version. The docs for binary layout also mention > The offsets buffer contains length + 1 signed integers > ... > and the last slot is the length of the values array which would mean there has to be a single zero in the offsets buffer for an empty `ListArray`. If this is a requirements it would be better to validate it when creating `ArrayData`. The code in [`ArrayData::validate_each_offset`](https://github.com/apache/arrow-rs/blob/b4642ecf9cb4a3d8b5741655fdc7d06b71bf41e6/arrow/src/array/data.rs#L1045) explicitly allow this case though: ```rust // An empty binary-like array can have 0 offsets if self.len == 0 && offset_buffer.is_empty() { return Ok(()); } ``` I'm more hesitant to change this now, maybe let's wait for some more eyes on this. _Originally posted by @jhorstmann in https://github.com/apache/arrow-rs/pull/1602#discussion_r854389543_ -- 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.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org