GitHub user dongjoon-hyun opened a pull request:
https://github.com/apache/spark/pull/15953
[SPARK-18517][SQL] DROP TABLE IF EXISTS should not warn for non-existing
tables
## What changes were proposed in this pull request?
Currently, `DROP TABLE IF EXISTS` shows warning for non-existing tables.
However, it had better be quiet for this case by definition of the command.
**BEFORE**
```scala
scala> sql("DROP TABLE IF EXISTS nonexist")
16/11/20 20:48:26 WARN DropTableCommand:
org.apache.spark.sql.catalyst.analysis.NoSuchTableException: Table or view
'nonexist' not found in database 'default';
```
**AFTER**
```scala
scala> sql("DROP TABLE IF EXISTS nonexist")
res0: org.apache.spark.sql.DataFrame = []
```
## How was this patch tested?
Manual because this is related to the warning messages instead of
exceptions.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dongjoon-hyun/spark SPARK-18517
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15953.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 #15953
----
commit 95a8a32ae6e3b4f547431bf604bfadf5223e7c79
Author: Dongjoon Hyun <[email protected]>
Date: 2016-11-21T04:52:41Z
[SPARK-18517][SQL] DROP TABLE IF EXISTS should not warn for non-existing
tables
----
---
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]