skyon0522-ai opened a new pull request, #4048: URL: https://github.com/apache/avro/pull/4048
## What is the purpose of the change Fix [AVRO-4265](https://issues.apache.org/jira/browse/AVRO-4265). Parsing a record before its referenced enum currently rejects a valid enum field default against the unresolved record placeholder. Reuse the schema-readiness check already used by the IDL reader, and validate defaults after unresolved references have been replaced. Fully resolved types keep eager validation, and the existing validation opt-out is preserved. Skip the readiness walk when default validation is disabled or no default is present. ## Verifying this change This change adds tests for both record/enum parse orders, retained and aggregate schema identities, invalid defaults after resolution, eager validation of known types, the legacy opt-out, unresolved names, and nullable cross-file cycles. The valid forward enum case failed on the original production code. The invalid enum case also failed prematurely while parsing, rather than at final resolution. Both pass with this change, while the other controls retain their behavior. On Linux, the selected `TestSchema`, `TestSchemaParser`, and `TestSchemaBuilder` tests passed under all three configurations: 113 cases per configuration, or 339 test-case executions in total, with no failures, errors or skipped cases. Maven 3.9.11 launched on JDK 21; the unchanged project toolchain configuration selected JDK 17.0.20.1 for compilation and tests. Spotless and Checkstyle passed. The root `install` lifecycle, run without global test or quality skip flags, also passed across all 27 reactor projects, including the core Invoker builds on JDK 11, 17 and 21. The upstream `test -Phadoop2` command passed all 27 projects using Hadoop 2.10.1. Existing test skips remain; the Hadoop 2 command covers the test phase. The separate existing limitation involving finite object defaults across circular references is outside this fix; nullable cycles are covered. ## 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]
