KiranVelumuri commented on code in PR #4915:
URL: https://github.com/apache/hive/pull/4915#discussion_r1417800663
##########
ql/src/test/queries/clientpositive/insert_overwrite_drop_partition.q:
##########
@@ -0,0 +1,46 @@
+set hive.exec.dynamic.partition.mode=nonstrict;
+set hive.stats.column.autogather=false;
+set hive.stats.autogather=false;
+set hive.compute.query.using.stats=false;
+
+CREATE EXTERNAL TABLE `table1`(
+ `name` string,
+ `number` string)
+PARTITIONED BY (
+ `part_col` string);
+
+CREATE EXTERNAL TABLE `table2`(
+ `name` string,
+ `number` string)
+PARTITIONED BY (
+ `part_col` string);
+
+insert into table table1 values ('a', '10', 'part1');
+insert into table table1 values ('b', '11', 'part1');
+insert into table table1 values ('a2', '2', 'part2');
+
+insert into table table2 values ('x', '100', 'part1');
+insert into table table2 values ('y', '101', 'part1');
+insert into table table2 values ('z', '102', 'part1');
+insert into table table2 values ('x2', '200', 'part2');
+insert into table table2 values ('y2', '201', 'part2');
+
+--should be 2
+select count(*) from table1 where part_col='part1';
+
+--should be 3
+select count(*) from table2 where part_col='part1';
+
+alter table table2 drop partition(part_col='part1');
+
+insert overwrite table table2 partition(part_col='part1') select name, number
from table1 where part_col='part1';
Review Comment:
Yes, I have checked this. Thank you for mentioning LOAD OVERWRITE PARTITION
for which this issue exists as well, which has been solved with these changes.
Attached q file for the same.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]