-
Notifications
You must be signed in to change notification settings - Fork 28.6k
[SPARK-16867][SQL] createTable and alterTable in ExternalCatalog should not take db #14476
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 build #63159 has finished for PR 14476 at commit
|
@@ -82,7 +82,7 @@ abstract class ExternalCatalog { | |||
* Note: If the underlying implementation does not support altering a certain field, | |||
* this becomes a no-op. | |||
*/ | |||
def alterTable(db: String, tableDefinition: CatalogTable): Unit | |||
def alterTable(tableDefinition: CatalogTable): Unit |
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.
document that this does not support moving database?
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.
Logically a table is referenced by a pair of dbName
and tableName
. If we have a table db1.tbl1
, and then alter table db2.tbl1
, the semantic is not moving tbl1
from db1
to db2
, but alter a nonexistent table db2.tabl1
. For ALTER TABLE, I think there is no such a concept about moving database
. what do you think?
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.
Let's add doc to explain that it does not support moving a table to another db since a developer want to use it in this way by just looking at this API (tableDefinition has a db field).
LGTM |
Test build #63212 has finished for PR 14476 at commit
|
Test build #63217 has finished for PR 14476 at commit
|
LGTM, merging to master. Thanks! |
What changes were proposed in this pull request?
These 2 methods take
CatalogTable
as parameter, which already have the database information.How was this patch tested?
existing test