wleeaf opened a new pull request, #11882: URL: https://github.com/apache/arrow-rs/pull/11882
# Which issue does this PR close? - Closes #11850. # Rationale for this change When an IPC schema has a union without `typeIds`, the type ids are assigned with `UnionFields::from_fields`, which panics if there are more than 128 children. The schema comes from untrusted input, so this should be an error. # What changes are included in this PR? Use the fallible `UnionFields::try_from_fields` in `get_data_type` and propagate its error, matching the `typeIds` branch, which already uses `UnionFields::try_new`. # Are these changes tested? Yes. The reproducer from the issue is added as `try_fb_to_schema_union_without_type_ids_too_many_fields_is_err`. It panics without the fix and passes with it. # Are there any significant user-facing changes? No. AI usage: this change was prepared with Claude Code (an AI coding agent). The fix and test were generated by it and checked against the failing test from the issue. -- 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]
