Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Truncate statement is not working when database is specified

Highlighted

Truncate statement is not working when database is specified

Champion Alumni

Hello,

 

This returns un error:

 

TRUNCATE TABLE database_name.table_name PARTITION (date_by_day='2015-08-19');

While this works:

USE database_name;

TRUNCATE TABLE table_name PARTITION (date_by_day='2015-08-19');

Note: I'm using Cloudera 5.3

 

 

Thank you!

 

 

GHERMAN Alina
2 REPLIES 2
Highlighted

Re: Truncate statement is not working when database is specified

Master Guru
This seems like a limitation in the SQL parser of Apache Hive for the TRUNCATE statement. Can you please report this on Apache Hive's JIRAs at https://issues.apache.org/jira/browse/HIVE and share the JIRA ID?

Re: Truncate statement is not working when database is specified

Champion Alumni

Of course, here is the jira that I created:

https://issues.apache.org/jira/browse/HIVE-13215

 

I'm not really sure if I chose the best tags, and labels :D

 

 

Alina

GHERMAN Alina
Don't have an account?
Coming from Hortonworks? Activate your account here