laserninja opened a new pull request, #18118: URL: https://github.com/apache/iceberg/pull/18118
Fixes #18117. `SingleValueParser.toJson` can serialize an optional null map value, but `fromJson` fails on that output because `ImmutableMap.Builder` rejects nulls. Build a `LinkedHashMap` and return an unmodifiable view to preserve iteration order and immutability while accepting optional null values. Explicitly reject null keys, duplicate keys (including an earlier null value), and null required values with argument errors. Validation on JDK 17: the five new regressions failed before the fix. `TestSingleValueParser`, `TestSchemaParser`, `TestDataTaskParser`, `TestContentFileParser`, and `TestExpressionParser` passed afterward, along with core formatting and `revapi` checks. --- **AI Disclosure** - Model: GPT-6 - Platform/Tool: Codex - Human Oversight: unreviewed - Prompt Summary: Reproduce and fix optional null map value parsing, preserve validation and immutability, and create an issue and PR. -- 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]
