tustvold opened a new issue, #1750:
URL: https://github.com/apache/arrow-rs/issues/1750

   **Problem**
   
   ArrayData::Slice contains a special case for StructArray where it recurses 
the offset into its children. However, it preserves the offset on the parent 
ArrayData, in order for the validity buffer to work correctly.
   
   The result is the offset has been pushed down to the child arrays, but is 
still present on the parent ArrayData. This makes it unclear if an offset 
should or should not be applied to the child_array.
   
   **Proposal**
   
   There are longer term suggestions around handling offsets in ArrayData 
differently, but until then I would like to propose:
   
   * Remove the ArrayData::slice special-case
   * Slice child data within `StructArray` when constructing `boxed_fields`
   
   This is consistent with how we handle offsets elsewhere, with ArrayData a 
dumb container, and the `Array` providing the logic to interpret the offset 
correctly.
   
   Thoughts @nevi-me 
   


-- 
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]

Reply via email to