timmyb32r opened a new pull request, #12363:
URL: https://github.com/apache/arrow-rs/pull/12363

   # Which issue does this PR close?
   
   None — standalone bug fix.
   
   # Rationale for this change
   
   `Fields::filter_leaves()` could produce an invalid Map type when the 
predicate excluded either its key or value field. Constructing an array from 
the resulting type would then panic because Map entries must contain exactly 
two fields.
   
   # What changes are included in this PR?
   
   Exclude a Map when filtering removes its key or value field. Filtering 
within nested key/value types remains supported as long as both fields survive.
   
   Document this behavior without changing public API signatures.
   
   # Are these changes tested?
   
   Added regression tests covering:
   - All key/value selection combinations, sorted and unsorted maps, leaf 
indices, sibling fields, and predicate errors.
   - Partial filtering within struct keys and values.
   - Nested maps, including empty-array construction and full validation of the 
resulting type.
   
   The three new tests fail before the fix and pass afterward, including under 
Miri.
   
   # Are there any significant user-facing changes?
   
   # AI usage disclosure
   
   Codex helped implement the fix, generate regression tests, and draft this PR 
description.


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