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

   # Which issue does this PR close?
   
   - Closes #11599.
   
   # Rationale for this change
   
   `RowConverter::convert_rows` panicked with an index out of bounds on a dense 
union whose type ids are not below the number of fields, for example a single 
field with type id 5, although `convert_columns` accepted it.
   
   # What changes are included in this PR?
   
   When building the dense offsets, the decoder now looks up the field index 
with `type_id_to_field_idx`, which the same function already builds and uses to 
group the rows, instead of indexing its per-field counters by type id.
   
   # Are these changes tested?
   
   Yes, `test_dense_union_type_ids_not_below_field_count` round-trips a dense 
union with type ids 2 and 7. It panics without the fix.
   
   # Are there any significant user-facing changes?
   
   No.
   
   AI use: I used Claude Code to find the cause and write the fix and test. I 
reviewed the change and checked that the test fails without the fix.
   


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