Jefffrey opened a new issue, #11576: URL: https://github.com/apache/arrow-rs/issues/11576
### Describe the bug As part of #11533 I tried to ensure constructing `UnionFields` always validates properties: - no duplicate type IDs - no negative type IDs However since it derives serde theres technically a safe API to create `UnionFields` bypassing validation: https://github.com/apache/arrow-rs/blob/125d3ccea6f5f4a100868093e82b319640dc3906/arrow-schema/src/fields.rs#L312-L321 ### To Reproduce I haven't mocked a unit test to demonstrate this, its just theoretical ### Expected behavior Is there a way to enforce validation? Is it possible to remove the serde? What are the impacts of either? ### Additional context _No response_ -- 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]
