thswlsqls opened a new pull request, #17250:
URL: https://github.com/apache/iceberg/pull/17250

   Closes #17249
   
   ## Summary
   
   - `LoadViewResponseParser.fromJson()` guards the optional `config` field 
with `json.has(CONFIG)`, so an explicit `"config": null` from a REST server 
reaches `JsonUtil.getStringMap` and throws `IllegalArgumentException`.
   - Switch the guard to `json.hasNonNull(CONFIG)`, which treats a null config 
as absent and yields an empty config.
   - This matches the sibling `LoadTableResponseParser.fromJson()` (line 96), 
which already uses `hasNonNull` for the same optional `config` map; both 
parsers write `config` only when non-empty.
   - Backward compatible: a present config still parses.
   
   ## Testing done
   
   - Added `TestLoadViewResponseParser#nullConfig` asserting `"config": null` 
parses to an empty config (red before the fix, green after).
   - `./gradlew :iceberg-core:test --tests "*TestLoadViewResponseParser*" 
:iceberg-core:spotlessCheck :iceberg-core:checkstyleMain 
:iceberg-core:checkstyleTest :iceberg-core:revapi` — all passed.
   - Full `:iceberg-core:check` not run.
   


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