You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/06/02 09:42:41 UTC

[GitHub] [arrow-rs] jhorstmann commented on pull request #389: make slice work for nested types

jhorstmann commented on pull request #389:
URL: https://github.com/apache/arrow-rs/pull/389#issuecomment-852871638


   I think instead of switching of child_data.is_empty we rather need a special case for struct and union types. ListArray for example should work fine with the current logic. The arrays' offset applies to the offsets buffer which indexes into the child buffer, slicing just has to adjust that one offset without having to change the offset of child arrays. The same applies to Binary or StringArrays, which have the same layout as lists.
   
   For struct (and probably union too) however we'd need to adjust the offset field of all the child arrays by calling slice on them.


-- 
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:
users@infra.apache.org