I am facing a strange issue with hive, I have a table, partitioned on the basis of dept_key (its a integer eg.3212) table is created as follows
create external table dept_details (dept_key,dept_name,dept_location) PARTITIONED BY (dept_key_partition INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY '~' LOCATION '/dept_details/dept/';
Now I have some partitions already added e.g: 1204,1203,1204
When I tried dropping the partition I by mistake typed only dept_key
and not "dept_key_partition"
this in turn dropped all my partition
drop query alter table dept_details drop partition (dept_key=12)
, its a very strange issue which I am facing. Please let me know what can be the probable issue.
Thank you.
From Hive LanguageManual DDL...
Looks like the partial specification feature has been ported to other commands like DROP, TRUNCATE even if it's not explicit in the documentation.
In short: it's not a bug, it's a feature.