avro
avro copied to clipboard
AVRO-3649: reorder union types to match default
Why: We want to use @AvroDefault with @Nullable.
How does it help with resolving the issue: The schema generation automaticly picks the right order of the union type.
Side effects: This change has no side effects, because:
- The order of union types is irrelevant for schema compability.
- This change enables definitions wich has been invalid.
What is the purpose of the change
Implementing AVRO-3649.
Verifying this change
- Added test that validates that a correct schema is generated
Documentation
- This is my big question. Is the reflection serialization documented anywhere?
Just to link these two ideas together: @clesaec 's proposal is at https://github.com/apache/avro/pull/1922
This is my big question. Is the reflection serialization documented anywhere?
The best documentation for the reflection annotations is currently the Javadoc. Hopefully the new website will draw contributors to improve this situation...