felipecrv commented on PR #37877: URL: https://github.com/apache/arrow/pull/37877#issuecomment-1743626515
> I would therefore prefer we stick with the behaviour of ListArray where nulls must mask a valid slice. @tustvold note that the `List<T>` spec allows null list entries to be non-empty. Additionally, it would not be possible to leave `offsets[i]` unspecified since the length of potentially non-null entry `i - 1` depends on `offsets[i]` being defined as the limit of that slice. > Similar to the layout of variable-size binary, a null value may correspond to a non-empty segment in the child array. When this is true, the content of the corresponding segment can be arbitrary. https://arrow.apache.org/docs/format/Columnar.html#variable-size-list-layout **We need to establish what constitutes a valid slice** As I pointed out here https://github.com/apache/arrow/pull/37877#discussion_r1343041091 requiring the offsets to be within-bounds forbids the naturally occurring `child_data[0].length()` offset. Would it be enough to require that `sizes[i] == 0` when `i` is null to call it a "valid empty list-view"? @pitrou -- 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]
