Skip to content

[SPARK-27813][SQL] DataSourceV2: Add DropTable logical operation - #24686

Closed
jzhuge wants to merge 7 commits into
apache:masterfrom
jzhuge:SPARK-27813-pr
Closed

[SPARK-27813][SQL] DataSourceV2: Add DropTable logical operation#24686
jzhuge wants to merge 7 commits into
apache:masterfrom
jzhuge:SPARK-27813-pr

Conversation

@jzhuge

@jzhugejzhuge commented May 23, 2019

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Support DROP TABLE from V2 catalogs.
Move DROP TABLE into catalyst.
Move parsing tests for DROP TABLE/VIEW to PlanResolutionSuite to validate existing behavior.
Add new tests fo catalyst parser suite.
Separate DROP VIEW into different code path from DROP TABLE.
Move DROP VIEW into catalyst as a new operator.
Add a meaningful exception to indicate view is not currently supported in v2 catalog.

How was this patch tested?

New unit tests.
Existing unit tests in catalyst and sql core.

@jzhugejzhuge changed the title Spark 27813 pr[SPARK-27813][SQL] DataSourceV2: Add DropTable logical operationMay 23, 2019
@SparkQA

Copy link
Copy Markdown

Test build #105716 has finished for PR 24686 at commit de0ab34.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • class AstBuilder(conf: SQLConf)
  • case class DropTable(
  • case class DropTableExec(catalog: TableCatalog, ident: Identifier, ifExists: Boolean)

@jzhuge

Copy link
Copy Markdown
MemberAuthor

Split the SPARK-26946 commits into a separate PR #24689

@jzhuge

jzhuge commented May 24, 2019

Copy link
Copy Markdown
MemberAuthor

Making a few changes. Close it for now.

@jzhugejzhuge closed this May 24, 2019
Comment threadsql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala Outdated
@jzhugejzhuge reopened this May 26, 2019
@SparkQA

Copy link
Copy Markdown

Test build #105805 has finished for PR 24686 at commit db4a417.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • public class CatalogManager
  • \"Catalog '%s' plugin class not found: %s is not defined\", name, classKey(name)));
  • case class DropTable(
  • case class DropTableStatement(
  • case class DropTableExec(catalog: TableCatalog, ident: Identifier, ifExists: Boolean)

Comment threadsql/catalyst/src/main/java/org/apache/spark/sql/catalog/v2/Catalogs.java Outdated
Comment threadsql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala Outdated
@jzhuge

Copy link
Copy Markdown
MemberAuthor

No longer depend on #24689.
Did a better job isolating the changes only needed for DropTable this time, so diff should be much more cleaner.

@rdblue

Copy link
Copy Markdown
Contributor

+1 overall, just one minor style problem with boolean args to fix.

I think this is ready to go. You might also mention a couple of things in the PR description:

@cloud-fan, @dongjoon-hyun, could you review this DSv2 PR? I think it is ready to merge.

@dongjoon-hyun

Copy link
Copy Markdown
Member

Thank you for pinging me, @rdblue . Yep. I'll take a look, too~

@SparkQA

Copy link
Copy Markdown

Test build #105920 has finished for PR 24686 at commit 780f7ff.

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

@SparkQA

Copy link
Copy Markdown

Test build #105921 has finished for PR 24686 at commit dd5b799.

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

@SparkQA

Copy link
Copy Markdown

Test build #105941 has finished for PR 24686 at commit d5b0d4a.

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

@cloud-fan

Copy link
Copy Markdown
Contributor

thanks, merging to master!

@jzhuge

Copy link
Copy Markdown
MemberAuthor

Thanks @rdblue@dongjoon-hyun@cloud-fan !

mccheah pushed a commit to palantir/spark that referenced this pull request Jun 6, 2019
## What changes were proposed in this pull request?
Support DROP TABLE from V2 catalogs.
Move DROP TABLE into catalyst.
Move parsing tests for DROP TABLE/VIEW to PlanResolutionSuite to validate existing behavior.
Add new tests fo catalyst parser suite.
Separate DROP VIEW into different code path from DROP TABLE.
Move DROP VIEW into catalyst as a new operator.
Add a meaningful exception to indicate view is not currently supported in v2 catalog.
## How was this patch tested?
New unit tests.
Existing unit tests in catalyst and sql core.
Closesapache#24686 from jzhuge/SPARK-27813-pr.
Authored-by: John Zhuge <jzhuge@apache.org>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
Sign up for freeto 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.

5 participants

@jzhuge@SparkQA@rdblue@dongjoon-hyun@cloud-fan