nevi-me commented on pull request #9211: URL: https://github.com/apache/arrow/pull/9211#issuecomment-768839729
> but I think that in rust's notation that implementation will be unsound No worries, I'll fix the code to account for the variations mentioned. I was doing a quick impl to see what the impact on the slice benchmark would look like. For lists, we might be further constrained by whether the list's child field is a struct, list or primitive. If we don't offset the list's child array, we could have a similar case to the problems with struct. So perhaps an acceptable way of slicing lists could still be to propagate the offset and length down, but use the list's offset buffer to determine such values for the child. Structs are fine, because as long as we implement the correct logic for lists inside `ArrayData::slice()`, structs of lists will retain the behaviour of lists. With the data buffers, we could opt not to populate their offsets, and use the `ArrayData::offset` like you suggest, but I think with the null buffer we would still need to populate the offsets. _____ I don't know if there's anything still pending in this PR, I'm happy with the changes so far, and can approve it. Then I'll work on the changes above in a separate PR so it doesn't sully and hold up this one. What do you think @jorgecarleitao @alamb @mqy @jhorstmann ? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org