RyanSkraba opened a new pull request, #3765: URL: https://github.com/apache/avro/pull/3765
## What is the purpose of the change When reflecting on a class with a recursive reference, make sure that the schemas are parsed and emitted in the correct order. Currently after #3304, schemas are defined to be emitted when they are completely resolved (i.e. a RECORD schema is put into the context after all its fields have also been completely resolved). Unfortunately for recursive data where a field is the same class as a parent structure, this causes a stack overflow. This can be resolved by noting that the record schema is "in progress" by adding it to the list *before* it is fully resolved. In order to keep the right order in the map in the end, it needs to be removed and re-added after the fields are finished resolving. ## Verifying this change *(Please pick one of the following options)* This change added tests to `TestReflect`. Current tests that check the schema order still pass. ## Documentation - Does this pull request introduce a new feature? **no** - 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]
