Apache Iceberg version
main @ 5f3d3c5
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.
Apache Iceberg version
main @ 5f3d3c5
Query engine
None (engine-agnostic, REST catalog client)
Please describe the bug
LoadViewResponseParser.fromJson()throwsIllegalArgumentExceptionwhen a REST server sends"config": nullin a load view response. It guards the optionalconfigfield withjson.has(CONFIG)(core/.../rest/responses/LoadViewResponseParser.java line 79), so an explicit JSON null passes the guard and reachesJsonUtil.getStringMap, which rejects it with "Cannot parse string map from non-object value".The sibling
LoadTableResponseParser.fromJson()guards the same optionalconfigmap withjson.hasNonNull(CONFIG)(line 96) and treats a null config as absent. Both parsers writeconfigonly 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
LoadTableResponseParserreturns.Actual: throws
IllegalArgumentException.Additional context
Aligning the guard to
json.hasNonNull(CONFIG)is backward compatible: a present config still parses.