Skip to content

[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

Closed
wants to merge 3 commits into from

Conversation

cloud-fan
Copy link
Contributor

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

@cloud-fan
Copy link
Contributor Author

cc @rxin @yhuai @liancheng

@SparkQA
Copy link

SparkQA commented Aug 3, 2016

Test build #63159 has finished for PR 14476 at commit e152ff6.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@@ -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
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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).

@gatorsmile
Copy link
Member

LGTM

@SparkQA
Copy link

SparkQA commented Aug 4, 2016

Test build #63212 has finished for PR 14476 at commit 2093906.

  • This patch fails to build.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 4, 2016

Test build #63217 has finished for PR 14476 at commit d6a91f5.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@liancheng
Copy link
Contributor

LGTM, merging to master. Thanks!

@asfgit asfgit closed this in 43f4fd6 Aug 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants