-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Support drop iceberg table when metadata or snapshot is missing and refactor code for delta-lake #15065
Support drop iceberg table when metadata or snapshot is missing and refactor code for delta-lake #15065
Changes from all commits
3550a3c
ec7ce17
376a0de
1856081
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -264,9 +264,18 @@ Optional<TableExecuteHandle> getTableHandleForExecute( | |
* Drops the specified table | ||
* | ||
* @throws RuntimeException if the table cannot be dropped or table handle is no longer valid | ||
* | ||
* @deprecated use {@link #dropTable(Session, QualifiedObjectName)} | ||
*/ | ||
void dropTable(Session session, TableHandle tableHandle, CatalogSchemaTableName tableName); | ||
|
||
/** | ||
* Drops the specified table | ||
* | ||
* @throws RuntimeException if the table cannot be dropped | ||
*/ | ||
void dropTable(Session session, QualifiedObjectName tableName); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want this method to replace the old one,
Doing this would reveal that the old drop handles redirections whereas the new drop-by-name cannot do that. Also, decoupling There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @martint wdyt? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks unresolved. @krvikash @findinpath do you have a plan here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. perhaps something like this (rough idea, not polished up)
sealed class DropResult
permits DropSuccess, DropRedirected class DropSuccess { .. } // singleton (can this be an enum?) records DropRedirected(CatalogSchemaTableName target) {} |
||
|
||
/** | ||
* Truncates the specified table | ||
*/ | ||
|
@@ -708,6 +717,11 @@ default boolean isMaterializedView(Session session, QualifiedObjectName viewName | |
*/ | ||
RedirectionAwareTableHandle getRedirectionAwareTableHandle(Session session, QualifiedObjectName tableName, Optional<TableVersion> startVersion, Optional<TableVersion> endVersion); | ||
|
||
/** | ||
* Get the table name after performing redirection. | ||
*/ | ||
QualifiedObjectName getRedirectedTableName(Session session, QualifiedObjectName tableName); | ||
|
||
/** | ||
* Returns true if the connector reports number of written bytes for an existing table. Otherwise, it returns false. | ||
*/ | ||
|
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.
This overload is a dead code now, no need for keeping it (as deprecated)