GitHub user gatorsmile opened a pull request:

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

    [SPARK-14362] [SQL] DDL Native Support: Drop View

    #### What changes were proposed in this pull request?
    
    This PR is to provide a native support for DDL "DROP VIEW". The PR includes 
native parsing and native analysis.
    
    Based on the HIVE DDL document for 
[DROP_VIEW_WEB_LINK](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-
    DropView
    ), `DROP VIEW` is defined as, 
    **Syntax:**
    ```SQL
    DROP VIEW [IF EXISTS] [db_name.]view_name;
    ```
     - to remove metadata for the specified view. 
     - illegal to use DROP TABLE on a view.
     - illegal to use DROP VIEW on a table.
    
    #### How was this patch tested?
    For verifying command parsing, added test cases in 
`spark/sql/hive/HiveDDLCommandSuite.scala`
    For verifying command analysis, added test cases in 
`spark/sql/hive/execution/HiveDDLSuite.scala`


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

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

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

    https://github.com/apache/spark/pull/12146.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 #12146
    
----
commit 0575f8918ded9deae74b1612f53b53e9fcbea92a
Author: gatorsmile <[email protected]>
Date:   2016-04-04T01:29:13Z

    improve the test cases.

commit 65a5ceb652a001af99625809f03d39cb0a7eafec
Author: gatorsmile <[email protected]>
Date:   2016-04-04T02:28:41Z

    drop view.

commit 6c672ce0f1a3175b6bfaf37ebacfdf4324d851cf
Author: gatorsmile <[email protected]>
Date:   2016-04-04T04:10:07Z

    added test cases for commands.

commit 4e858d104a400045398792b6b0c470e6ca6a7b8d
Author: gatorsmile <[email protected]>
Date:   2016-04-04T05:37:31Z

    added test cases for DDL execution

----


---
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