kumarpritam863 opened a new pull request, #18892: URL: https://github.com/apache/iceberg/pull/18892
`CompareSchemasVisitor` ignored the optionality of list elements and map values, so an optional input element compared as the same schema as a required table element and null elements failed at write time. It also returned the type result of a field before checking whether a required column has to become optional, so a required `long` was never made optional for an optional `int` input. An optional input column for a required identifier field, or for a struct containing one, requested an update whose commit failed with "Cannot add field id as an identifier field: not a required field" on every record; both visitors now keep those fields required. This is Flink 2.3 only; backports follow. Test plan: `TestCompareSchemasVisitor`, `TestEvolveSchemaVisitor` and `TestTableUpdater` cover optional list elements and map values, required columns that need a conversion, and identifier fields, also nested, with the opposite directions staying unchanged. 11 of the new tests fail without the change, and the `sink.dynamic` tests pass. --- **AI Disclosure** - Model: Claude Sonnet 5.5 - Platform/Tool: Claude Code -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
