You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Simeon Simeonov (JIRA)" <ji...@apache.org> on 2015/07/25 17:24:05 UTC

[jira] [Created] (SPARK-9343) DROP TABLE ignores IF EXISTS clause

Simeon Simeonov created SPARK-9343:
--------------------------------------

             Summary: DROP TABLE ignores IF EXISTS clause
                 Key: SPARK-9343
                 URL: https://issues.apache.org/jira/browse/SPARK-9343
             Project: Spark
          Issue Type: Bug
          Components: SQL
    Affects Versions: 1.4.1
         Environment: Ubuntu on AWS
            Reporter: Simeon Simeonov


If a table is missing, {{DROP TABLE IF EXISTS _tableName_}} generates an exception:

{code}
15/07/25 15:17:32 ERROR Hive: NoSuchObjectException(message:default.test table not found)
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_table(HiveMetaStore.java:1560)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:105)
	at com.sun.proxy.$Proxy27.get_table(Unknown Source)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getTable(HiveMetaStoreClient.java:997)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:89)
	at com.sun.proxy.$Proxy28.getTable(Unknown Source)
	at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:976)
	at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:918)
	at org.apache.hadoop.hive.ql.exec.DDLTask.dropTableOrPartitions(DDLTask.java:3846)
         ....
{code}

I standalone test with full spark-shell output is available at: [https://gist.github.com/ssimeonov/eeb388d13f802689d772]



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