-Re: DROP TABLE does not respect the IF EXISTS clause
Harsh J 2013-02-01, 00:40
Not sure how relevant it is but I faced a similar problem around ALTER
TABLE DROP PARTITION IF EXIST.
See https://issues.apache.org/jira/browse/HIVE-3576 for the specific
issue and my commands to reproduce it, and also try to perhaps set
hive.exec.drop.ignorenonexistent to true to see if it changes anything
On Fri, Feb 1, 2013 at 3:27 AM, Marc Limotte <[EMAIL PROTECTED]> wrote:
> Hi Mark,
> A table. But it doesn't seem to matter. I get this error on the DROP,
> before even attempting to create a table. I get the same thing for any
> arbitrary table name. For example:
> hive> DROP TABLE IF EXISTS kdsjhfkjhds;
> FAILED: Error in semantic analysis: Table not found kdsjhfkjhds
> I think I found something, though. This install is still using the Derby
> metastore, and the hive web service is running, so I'm getting errors like
> "A read-only user or a user in a read-only database…". I'm guessing the
> error above is just a consequence of this one-user limitation. So, the real
> issue is that the error message reported by "DROP TABLE IF EXISTS" is
> mis-leading and obscures the real problem.
> On Thu, Jan 31, 2013 at 11:42 AM, Mark Grover <[EMAIL PROTECTED]>
>> It seemed to work on my installation of Hive 0.9. Is this a table or a
>> view you are trying to drop?
>> Mind sharing the create table definition?
>> On Thu, Jan 31, 2013 at 10:42 AM, Marc Limotte <[EMAIL PROTECTED]>
>>> I'm testing with Hive 0.9.0 (in Amazon EC2, but NOT emr). I'm
>>> experiencing a problem where DROP TABLE does not respect the IF EXISTS
>>> clause, so it still throws an error when the table doesn't exist and this
>>> causes the script to stop executing. Here's what it looks like from the
>>> hive shell:
>>> hive> DROP TABLE IF EXISTS recalc_aggregate_premium;
>>> FAILED: Error in semantic analysis: Table not found