Anurag-S1ngh opened a new pull request, #19255:
URL: https://github.com/apache/iceberg/pull/19255

   ## Summary
   
   - `SingleValueParser` writes optional null map values, but its parser could 
not read that output. `mapFromJson` used `ImmutableMap.Builder`, which rejects 
null values with `NullPointerException: null value in entry`.
   - Build the map with a mutable map that keeps insertion order, and still 
reject duplicate keys.
   
   ## Changes
   
   - `SingleValueParser.mapFromJson`: replace the immutable builder with a 
linked hash map and a duplicate-key check.
   - `TestSingleValueParser`: round-trip an optional map with a null value.
   
   ## Testing
   
   - `./gradlew :iceberg-core:test --tests 
"org.apache.iceberg.TestSingleValueParser"` passes.
   - The new test fails with the original `NullPointerException` without the 
change.
   - `spotlessApply` run for the module.
   
   Closes #18117
   


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

Reply via email to