sadicangel opened a new pull request, #4031:
URL: https://github.com/apache/avro/pull/4031

   ## What is the purpose of the change
   
   Fix [AVRO-3671](https://issues.apache.org/jira/browse/AVRO-3671) by 
materializing enum values as their generated CLR types in `SpecificDatumReader`.
   
   Previously, enum values were returned as boxed integer ordinals, losing 
branch identity in unions such as `["int", "Enum1", "Enum2"]`.
   
   Resolve the reader enum type through `ObjectCreator` and create the CLR enum 
value from the resolved reader ordinal. Existing symbol translation, default 
handling, generic-reader behavior, and public APIs remain unchanged.
   
   Callers relying on boxed integer enum results must now handle the generated 
CLR enum types.
   
   ## Verifying this change
   
   Added 21 regression cases using generated CLR types, covering:
   
   - Ordinary and nullable enum fields.
   - Integer/enum and multiple-enum unions, including `["int", "Enum1", 
"Enum2"]` and `["null", "int", "Enum1"]`.
   - Runtime type preservation and byte-preserving reserialization.
   - Reordered symbols, reader enum defaults, and missing-field defaults.
   - Unchanged generic enum materialization.
   
   Validation on Windows:
   
   - Release build passed with zero warnings or errors.
   - C# test suite passed across .NET 8, 9, and 10, including interop and 
package-content tests.
   
   ## Documentation
   
   - Does this pull request introduce a new feature? No; this is a bug fix.
   - If yes, how is the feature documented? Not applicable.


-- 
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]

Reply via email to