-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Hive 29279: Make table ddl task work with catalog #6252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| } | ||
| -> ^(TOK_TABNAME $cat $db $tab $meta?) | ||
|
|
||
| // case 2:db.table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zhangbutao , For iceberg meta tables like snapshots, files etc. the select * from db.tbl.meta should work which is the existing behaviour. Meaning, case 2 should have meta? IMO. Won't it misinterpret this example select with the case 1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. There will be a breaking change here. We cannot distinguish between the semantic expressions cat.db.tbl and db.tbl.meta, so for Iceberg's meta tables, I will switch to using the format cat.db.tbl.meta, or reference Trino's approach as shown at https://trino.io/docs/current/connector/iceberg.html#metadata-tables, for example: SELECT * FROM "test_table$properties". In any case, this will cause backward compatibility issues.
Regarding this breaking change, I will initiate a discussion in the dev community mailing list to see if anyone has better suggestions.
bd4a562 to
2fa7ee4
Compare
|



What changes were proposed in this pull request?
The purpose of this PR is to implement table-related DDL statements such as create/show/drop/alter to correctly recognize the semantics of cat.db.tbl, thereby implementing DDL operations on tables in non-default catalogs.
There are many table DDL interfaces that need to be refactored. This PR is temporarily marked as a draft, but if anyone is interested, suggestions are always welcome.
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?