You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "friendlymatthew (via GitHub)" <gi...@apache.org> on 2025/12/01 12:04:01 UTC
[I] Incorrect `PartialEq` behavior for `UnionFields` [arrow-rs]
friendlymatthew opened a new issue, #8936:
URL: https://github.com/apache/arrow-rs/issues/8936
`UnionFields` represents a set of unique field ids paired with unique data types. Internally, it is stored as a list of `(id, data type)` tuples. However, because `UnionFields` currently derives `PartialEq`, equality is determined by the raw tuple list ordering rather than by set semantics
This leads to incorrect behavior, such as the following assertion failing even though the logical sets are identical:
```rs
assert_eq!(
UnionFields::from(&[(0, t1), (1, t2)]),
UnionFields::from(&[(1, t2), (0, t1)])
);
```
--
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: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org