Indhumathi27 commented on code in PR #4915:
URL: https://github.com/apache/hive/pull/4915#discussion_r1414883544
##########
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');
+
Review Comment:
Can you add a check for stale partition exists here or not
--
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]