thswlsqls opened a new issue, #17249:
URL: https://github.com/apache/iceberg/issues/17249

   **Apache Iceberg version**
   main @ 5f3d3c560
   
   **Query engine**
   None (engine-agnostic, REST catalog client)
   
   **Please describe the bug**
   `LoadViewResponseParser.fromJson()` throws `IllegalArgumentException` when a 
REST server sends `"config": null` in a load view response. It guards the 
optional `config` field with `json.has(CONFIG)` 
(core/.../rest/responses/LoadViewResponseParser.java line 79), so an explicit 
JSON null passes the guard and reaches `JsonUtil.getStringMap`, which rejects 
it with "Cannot parse string map from non-object value".
   
   The sibling `LoadTableResponseParser.fromJson()` guards the same optional 
`config` map with `json.hasNonNull(CONFIG)` (line 96) and treats a null config 
as absent. Both parsers write `config` only when non-empty, so only this read 
guard differs.
   
   **Steps to reproduce**
   Call `LoadViewResponseParser.fromJson(json)` with a valid load view response 
containing `"config": null`.
   Expected: an empty config, as `LoadTableResponseParser` returns.
   Actual: throws `IllegalArgumentException`.
   
   **Additional context**
   Aligning the guard to `json.hasNonNull(CONFIG)` is backward compatible: a 
present config still parses.
   


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