-
- Downloads
[SPARK-14161][SQL] Native Parsing for DDL Command Drop Database
### What changes were proposed in this pull request? Based on the Hive DDL document https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL The syntax of DDL command for Drop Database is ```SQL DROP (DATABASE|SCHEMA) [IF EXISTS] database_name [RESTRICT|CASCADE]; ``` - If `IF EXISTS` is not specified, the default behavior is to issue a warning message if `database_name` does't exist - `RESTRICT` is the default behavior. This PR is to provide a native parsing support for `DROP DATABASE`. #### How was this patch tested? Added a test case `DDLCommandSuite` Author: gatorsmile <gatorsmile@gmail.com> Closes #11962 from gatorsmile/parseDropDatabase.
Showing
- sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala 14 additions, 0 deletions...c/main/scala/org/apache/spark/sql/execution/SparkQl.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala 18 additions, 0 deletions...in/scala/org/apache/spark/sql/execution/command/ddl.scala
- sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala 57 additions, 0 deletions.../apache/spark/sql/execution/command/DDLCommandSuite.scala
- sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala 0 additions, 1 deletion...ive/src/main/scala/org/apache/spark/sql/hive/HiveQl.scala
Loading
Please register or sign in to comment