GitHub user gatorsmile opened a pull request:

    https://github.com/apache/spark/pull/11977

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

    #### 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:**
    ```SQL
    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:**
    ```SQL
    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`

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gatorsmile/spark parseAlterDatabase

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/11977.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11977
    
----
commit ec3d1e1aea3707f7eeefcfb860bbc992fd8425b6
Author: gatorsmile <[email protected]>
Date:   2016-03-26T06:42:55Z

    Native parsing support for DDL commands "alter database set property" and 
"describe database"

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to