Skip to content

Conversation

@huaxingao
Copy link
Contributor

@huaxingao huaxingao commented Oct 27, 2019

What changes were proposed in this pull request?

Add AlterTableRecoverPartitionsStatement and make ALTER TABLE ... RECOVER PARTITIONS go through the same catalog/table resolution framework of v2 commands.

Why are the changes needed?

It's important to make all the commands have the same table resolution behavior, to avoid confusing end-users. e.g.

USE my_catalog
DESC t // success and describe the table t from my_catalog
ALTER TABLE t RECOVER PARTITIONS  // report table not found as there is no table t in the session catalog

Does this PR introduce any user-facing change?

Yes. When running ALTER TABLE ... RECOVER PARTITIONS Spark fails the command if the current catalog is set to a v2 catalog, or the table name specified a v2 catalog.

How was this patch tested?

Unit tests.

@huaxingao huaxingao changed the title [SPARK-29481][SQL] ALTER TABLE (RECOVER PARTITIONS) should look up catalog/table like v2 commands [SPARK-29612][SQL] ALTER TABLE (RECOVER PARTITIONS) should look up catalog/table like v2 commands Oct 27, 2019
@SparkQA
Copy link

SparkQA commented Oct 27, 2019

Test build #112722 has finished for PR 26269 at commit e61f6bb.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class AlterTableRecoverPartitionsStatement(

@huaxingao
Copy link
Contributor Author

retest this please

@SparkQA
Copy link

SparkQA commented Oct 27, 2019

Test build #112725 has finished for PR 26269 at commit e61f6bb.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class AlterTableRecoverPartitionsStatement(

@huaxingao
Copy link
Contributor Author

@viirya Could you please review? The unit tests failed, but it doesn't seem to be related to my changes.

@viirya
Copy link
Member

viirya commented Oct 28, 2019

retest this please

@viirya
Copy link
Member

viirya commented Oct 28, 2019

The description is not correct at all, SHOW CREATE TABLE t

@viirya
Copy link
Member

viirya commented Oct 28, 2019

cc @cloud-fan @imback82

@SparkQA
Copy link

SparkQA commented Oct 29, 2019

Test build #112799 has finished for PR 26269 at commit e61f6bb.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class AlterTableRecoverPartitionsStatement(

@SparkQA
Copy link

SparkQA commented Oct 29, 2019

Test build #112804 has finished for PR 26269 at commit aaa6bfd.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in e92b754 Oct 29, 2019
@huaxingao
Copy link
Contributor Author

Thanks! @cloud-fan @viirya

@huaxingao huaxingao deleted the spark-29612 branch October 29, 2019 06:01
Copy link
Contributor

@imback82 imback82 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Late +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants