vikramahuja1001 commented on code in PR #6013:
URL: https://github.com/apache/hive/pull/6013#discussion_r2276321557


##########
ql/src/test/queries/clientpositive/alter_table_set_default_partition.q:
##########
@@ -0,0 +1,65 @@
+drop table if exists tbl_orc;
+
+create external table tbl_orc(a int, b string, c int) partitioned by (d int) 
stored as orc;
+describe formatted tbl_orc;
+INSERT INTO tbl_orc (a, b, c) values(3, 'ccc', 12);
+show partitions tbl_orc;
+dfs -ls ${hiveconf:hive.metastore.warehouse.dir}/tbl_orc/;
+alter table tbl_orc set default partition to 'random_partition';
+describe formatted tbl_orc;
+show partitions tbl_orc;
+select * from tbl_orc;
+select count(*) from tbl_orc;
+INSERT INTO tbl_orc (a, b, c) values(4, 'ddd', 23);
+show partitions tbl_orc;
+select * from tbl_orc;
+select count(*) from tbl_orc;
+dfs -ls ${hiveconf:hive.metastore.warehouse.dir}/tbl_orc/;
+drop table if exists tbl_orc;
+
+
+create external table tbl_orc(a int, b string, c int) partitioned by (d int, e 
string, f bigint) stored as orc;

Review Comment:
   Changed the name to make all table names unique in this qfile



##########
ql/src/test/queries/clientpositive/msck_repair_9.q:
##########
@@ -7,28 +7,31 @@ INSERT INTO tbl_x values(1, 'aaa', 12, 2);
 INSERT INTO tbl_x values(2, 'bbb', 12, 3);
 INSERT INTO tbl_x (id, name, month) values(3, 'ccc', 12);
 
-SET hive.exec.default.partition.name=ANOTHER_PARTITION;
+alter table tbl_x set default partition to 'ANOTHER_PARTITION';
 INSERT INTO tbl_x (id, name, day) values(4, 'ddd', 3);
 
 SHOW PARTITIONS tbl_x;
 
 CREATE EXTERNAL TABLE tbl_y (id INT, name STRING) PARTITIONED BY (month INT, 
day INT) stored as ORC location 
'${system:test.tmp.dir}/apps/hive/warehouse/test.db/tbl_x/';
+alter table tbl_y set default partition to 'ANOTHER_PARTITION';
 
 set hive.msck.path.validation=skip;
 
 MSCK REPAIR TABLE tbl_y;
 
 SHOW PARTITIONS tbl_y;
 
-SET hive.exec.default.partition.name=SECOND_PARTITION;
+alter table tbl_y set default partition to 'SECOND_PARTITION';
 INSERT INTO tbl_y (id, name, day) values(4, 'ddd', 3);
+SHOW PARTITIONS tbl_y;
 
-SET hive.exec.default.partition.name=OTHER_PARTITION;
+alter table tbl_y set default partition to 'OTHER_PARTITION';
 INSERT INTO tbl_y (id, name, day) values(4, 'ddd', 3);
-
 SHOW PARTITIONS tbl_y;
 
 set hive.msck.path.validation=ignore;
+
+dfs ${system:test.dfs.mkdir} -p 
${system:test.tmp.dir}/apps/hive/warehouse/test.db//tbl_x/month=DEFAULT/day=DEFAULT;

Review Comment:
   Sure, made the change



-- 
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: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to