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

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

Burak Yavuz created SPARK-18465:
-----------------------------------

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