Repository navigation
feat: Full enum support - #569
Conversation
1f70e24 to
739b977
Compare
|
Tests have now been added, so should be ready for review. There will almost certainly be edgecases that neither of us think of, but we can fix that in a later release. |
| "type": "record", | ||
| "name": "Alt", | ||
| "fields": [], | ||
| "org.apache.avro.rust.tuple": true |
There was a problem hiding this comment.
Why is Alt {} marked as a tuple here ?
There was a problem hiding this comment.
It's actually not in the generated schema, this is leftover from when it was Alt(). The test still passes because Schema == Schema does not check attributes. This is not the first time this has bitten us, we should think about changing the behaviour of PartialEq to check for absolute equality and have Schema::specification_eq and Schema::fast_specification_eq functions for the user to do specification related comparisons.
There was a problem hiding this comment.
By setting schema_equality.rs:256 false to true I've caught 9 other tests where this happens. I've fixed them all, but cases like these will likely come back in the future when we add more tests.
There was a problem hiding this comment.
Maybe we could put a #[cfg(test)] on schema_equality.rs:256 to set the boolean to true for tests.
No description provided.