Skip to content
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

[SPARK-14177] [SQL] Native Parsing for DDL Command "Describe Database" and "Alter Database" #11977

Closed
wants to merge 41 commits into from

Conversation

gatorsmile
Copy link
Member

What changes were proposed in this pull request?

This PR is to provide native parsing support for two DDL commands: Describe Database and Alter Database Set Properties

Based on the Hive DDL document:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL

1. ALTER DATABASE

Syntax:

ALTER (DATABASE|SCHEMA) database_name SET DBPROPERTIES (property_name=property_value, ...)
  • ALTER DATABASE is to add new (key, value) pairs into DBPROPERTIES
2. DESCRIBE DATABASE

Syntax:

DESCRIBE DATABASE [EXTENDED] db_name
  • DESCRIBE DATABASE shows the name of the database, its comment (if one has been set), and its root location on the filesystem. When extended is true, it also shows the database's properties

How was this patch tested?

Added the related test cases to DDLCommandSuite

gatorsmile and others added 30 commits November 13, 2015 14:50
@SparkQA
Copy link

SparkQA commented Mar 26, 2016

Test build #54257 has finished for PR 11977 at commit ec3d1e1.

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

@gatorsmile
Copy link
Member Author

cc @yhuai @hvanhovell @viirya

@yhuai
Copy link
Contributor

yhuai commented Mar 26, 2016

LGTM. Let's rebase the PR. Thanks!

@gatorsmile
Copy link
Member Author

sure, let me do it now. Thanks!

# Conflicts:
#	sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala
#	sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala
#	sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala
#	sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala
@SparkQA
Copy link

SparkQA commented Mar 26, 2016

Test build #54266 has finished for PR 11977 at commit 6517f1f.

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

@yhuai
Copy link
Contributor

yhuai commented Mar 27, 2016

Merging to master. Thanks!

@yhuai
Copy link
Contributor

yhuai commented Mar 27, 2016

I have fixed the conflict.

@asfgit asfgit closed this in a01b6a9 Mar 27, 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
4 participants