Skip to content

[REST] Design Catalog REST API in a way that enables adding Iceberg Views in the future #6315

@JanKaul

Description

@JanKaul

Feature Request / Improvement

Background

Table or view references in a SQL statement are typically resolved by looking up the reference in a catalog. Before that the query engine doesn't know whether the reference is a table or a view.

Expected behavior

When looking up a table/view reference with the REST catalog, the response should return table metadata if the reference is a table and view metadata if the reference is a view.

Current behavior

Currently the Catalog REST API is designed to only return iceberg tables. References that target views are not supported. I think the API should be designed in a way that enables adding support for views. The support doesn't have to be implemented now, but the API should be designed in a way that the support could be added later on without breaking backwards compatibility of the API.

One way of doing this could be to make the metadata field of LoadTableResult to be a oneOf of the TableMetadata type, which could be extended in the future to also return a ViewMetadata type.

Query engine

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions