Skip to content

Iceberg View Support #55

@Xuanwo

Description

@Xuanwo

We haven't talked about Iceberg Views yet and I'm not sure if you would like to support them in the future. I'm actually really interested in using views.

I don't want to include view support in this PR but I would like to future proof the catalog design to easily support views in the future.

The REST catalog is in the process of adding view support. However, I have the feeling that the initial REST catalog API wasn't designed with views in mind. There is one issue that comes up with the current design that we might be able to avoid for our catalog design. I will try to explain the issue.

Imagine a query engine wants to perform a query like the following:

SELECT first_name, last_name, age FROM users WHERE age > 18;

Without the catalog information the query engine doesn't know whether users refers to a view or a table. So if the catalog only exposes a load_table and load_view operation, the query engine doesn't know which one to call. I would prefer a load_tablelike (the naming is not important) operation that returns an

enum TableLike {
    Table(Table),
    View(View)
}

All iceberg catalogs except for the REST catalog return a "table metadata location" and it would be easy to distinguish between Tables and Views based on the metadata.

Let me know what you think.

Originally posted by @JanKaul in #54 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions