GitHub user gatorsmile opened a pull request:

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

    [SPARK-15184] [SQL] Fix Silent Removal of An Existent Temp Table by Rename 
Table

    #### What changes were proposed in this pull request?
    Currently, if we rename a temp table `Tab1` to another existent temp table 
`Tab2`. `Tab2` will be silently removed. This PR is to detect it and issue an 
exception message. 
    
    In addition, this PR also detects another issue in the rename table 
command. When the destination table identifier does have database name, we 
should not ignore them. That might mean users could rename a regular table. 
    
    #### How was this patch tested?
    Added two related test cases

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

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

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

    https://github.com/apache/spark/pull/12959.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 #12959
    
----
commit d7a2190dcaafa8c7be40aeeba2fa4c4eee31a3c5
Author: gatorsmile <[email protected]>
Date:   2016-05-06T17:06:49Z

    rename temp table

----


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