You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Herman van Hovell (JIRA)" <ji...@apache.org> on 2016/11/22 21:04:58 UTC

[jira] [Resolved] (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:all-tabpanel ]

Herman van Hovell resolved SPARK-18465.
---------------------------------------
       Resolution: Fixed
         Assignee: Burak Yavuz
    Fix Version/s: 2.1.0

> 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
>            Assignee: Burak Yavuz
>             Fix For: 2.1.0
>
>
> 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