Skip to content

Conversation

@friendlymatthew
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

This PR fixes the row converter's handling of union arrays with non-sequential type ids.

Previously, type ids were incorrectly used as array indices into the converters vector, causing panics or data corruption when type ids didn't match field positions. The fix was to add a mapping from type ids to field indices

@github-actions github-actions bot added the arrow Changes to the arrow crate label Jan 27, 2026
Copy link
Contributor Author

@friendlymatthew friendlymatthew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self review

Comment on lines +504 to +506
/// Row converters for each union field (indexed by field position)
/// the type_ids for each field position, and the encoding of null rows for each field
Union(Vec<RowConverter>, Vec<i8>, Vec<OwnedRow>),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RowConverter panics when encoding union array with non-default type IDs

1 participant