Repository navigation
Add metadata tables - #252
Conversation
6102fe5 to
6ed83e3
Compare
10a0536 to
b7a7765
Compare
| if (ops.current() == null) { | ||
| throw new NoSuchTableException("Table does not exist: " + identifier); | ||
| String name = identifier.name(); | ||
| TableType type = TableType.from(name); |
There was a problem hiding this comment.
Does this prevent creating tables that match one of the catalog TableTypes?
There was a problem hiding this comment.
Yes, this would prevent creating a table named db.table.history if db.table exists and db.table.history is a valid table name. Usually this won't happen because namespaces are some fixed depth. Hive, for example, only supports a single identifier as a namespace, which guarantees that this would not happen.
danielcweeks
left a comment
There was a problem hiding this comment.
A few minor and specific comments/questions.
More generally, I think some more comments around the new classes/tables where terminology could be confusing (e.g. DataFilesTable) would be helpful.
|
LGTM +1 |
This adds a metadata table that uses another table's manifests as data files. This is an easy way to view Iceberg metadata from a query engine. This also adds additional setup for other metadata tables, like history, snapshots, and manifests.
b7a7765 to
9487c25
Compare
|
Merging. Thanks for reviewing, @danielcweeks! |
|
I'm confused about how we can use metadata tables. It looks like we have to pass table type names to |
|
Thank you for the pointer. I see the point now. The name of the underlying table to be queried is stored in |
|
Yeah, the catalog first looks up the table name that is passed in and if it doesn't find that one, checks to see if the table name is a metadata table name and if the namespace is a table. If so, it will load the metadata table. |
Release 0.12.x-preview-3
This commit adds metadata tables:
history-- the snapshot logsnapshots-- known snapshotsmanifests-- manifest files for a snapshotfiles-- data files for a snapshotentries-- manifest entries for a snapshot