-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-20013][SQL][WIP] merge renameTable to alterTable in ExternCatalog #17340
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
Conversation
| } | ||
| } | ||
|
|
||
| test("alter 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.
already existed in SessionCatalogSuite
| assert(newTbl1.properties.get("toh") == Some("frem")) | ||
| } | ||
|
|
||
| test("alter table when database/table does not exist") { |
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.
already existed in SessionCatalogSuite
| } | ||
| } | ||
|
|
||
| test("rename table when destination table already exists") { |
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.
move to SessionCatalog
| catalog.dropTable("db2", "unknown_table", ignoreIfNotExists = true, purge = false) | ||
| } | ||
|
|
||
| test("rename 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.
already existed in SessionCatalogSuite
| assert(catalog.listTables("db2").toSet == Set("tblone", "tbl2")) | ||
| } | ||
|
|
||
| test("rename table when database/table does not exist") { |
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.
already existed in SessionCatalogSuite
| assert(!exists(db.locationUri)) | ||
| } | ||
|
|
||
| test("create/drop/rename table should create/delete/rename the directory") { |
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.
move to SessionCatalogSuite
|
Test build #74777 has finished for PR 17340 at commit
|
|
Test build #74778 has finished for PR 17340 at commit
|
|
Test build #74779 has finished for PR 17340 at commit
|
|
Test build #74780 has finished for PR 17340 at commit
|
What changes were proposed in this pull request?
merge renameTable to alterTable in ExternalCatalog has some reasons:
we'd better to unify them up to SessionCatalog
To unify them, we should move some logic from ExternalCatalog to SessionCatalog, renameTable is one of this.
while limit to the simple parameters in renameTable
even if we move the defaultTablePath logic to SessionCatalog, we can not pass it to renameTable.
So we can merge the renameTable to alterTable, and rename it in alterTable.
How was this patch tested?
delete some tests in ExternalCatalogSuite which already existed in SessionCatalogSuite,
and move some other tests in ExternalCatalogSuite which does not exist in SessionCatalogSuite