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: [email protected]
For additional commands, e-mail: [email protected]