You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/11/16 02:17:58 UTC

[jira] [Commented] (SPARK-18465) Uncache Table shouldn't throw an exception when table doesn't exist

    [ https://issues.apache.org/jira/browse/SPARK-18465?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15669104#comment-15669104 ] 

Apache Spark commented on SPARK-18465:
--------------------------------------

User 'brkyvz' has created a pull request for this issue:
https://github.com/apache/spark/pull/15896

> Uncache Table shouldn't throw an exception when table doesn't exist
> -------------------------------------------------------------------
>
>                 Key: SPARK-18465
>                 URL: https://issues.apache.org/jira/browse/SPARK-18465
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Burak Yavuz
>
> While this behavior is debatable, consider the following use case:
> {code}
> UNCACHE TABLE foo;
> CACHE TABLE foo AS 
> SELECT * FROM bar
> {code}
> The command above fails the first time you run it. But I want to run the command above over and over again, and I don't want to change my code just for the first run of it.
> The issue is that subsequent `CACHE TABLE` commands do not overwrite the existing table.
> There are alternate solutions, e.g.
> 1. 
> {code}
> UNCACHE TABLE IF EXISTS foo
> {code}
> 2. 
> {code}
> CACHE AND REPLACE TABLE foo
> {code}
> Which will require additional work with the parser.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org