Skip to content

Core: LoadViewResponseParser rejects explicit null config #17249

Description

@thswlsqls

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions