skyon0522-ai opened a new pull request, #11651:
URL: https://github.com/apache/arrow-rs/pull/11651

   # Which issue does this PR close?
   
   - Closes #11586
   
   # Rationale for this change
   
   Writing a union inside a sliced List or LargeList currently writes unsliced 
union buffers despite the sliced row count. Dense unions can read back values 
from different rows, while sparse unions can fail with a child-length mismatch.
   
   # What changes are included in this PR?
   
   Slice union type-ID and dense-offset buffers to the selected row range, and 
apply that row slice to sparse children before encoding. Retain dense children 
and the absolute offset values within their existing child views.
   
   # Are these changes tested?
   
   A regression test round-trips List and LargeList arrays containing dense or 
sparse unions through both File and Stream writers. It covers full, 
nonzero-offset and empty slices, nullable values, custom type IDs, and 
nonmonotonic dense offsets, comparing decoded rows and validating input/output 
data.
   
   AI assistance was used to analyze the serialization path and draft the code, 
regression test, and this description.
   
   # Are there any significant user-facing changes?
   
   No public API changes.
   


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