sankarh commented on a change in pull request #1050: URL: https://github.com/apache/hive/pull/1050#discussion_r467460705
########## File path: ql/src/test/queries/clientpositive/msck_repair_7.q ########## @@ -0,0 +1,71 @@ +DROP TABLE IF EXISTS repairtable_n7_1; +DROP TABLE IF EXISTS repairtable_n7_2; +DROP TABLE IF EXISTS repairtable_n7_3; +DROP TABLE IF EXISTS repairtable_n7_4; +DROP TABLE IF EXISTS repairtable_n7_5; +DROP TABLE IF EXISTS repairtable_n7_6; +DROP TABLE IF EXISTS repairtable_n7_7; +DROP TABLE IF EXISTS repairtable_n7_8; + +CREATE EXTERNAL TABLE repairtable_n7_1(key INT) PARTITIONED BY (p1 TINYINT) stored as ORC location '${system:test.tmp.dir}/apps/hive/warehouse/test.db/repairtable_n7_1/'; +CREATE EXTERNAL TABLE repairtable_n7_2(key INT) PARTITIONED BY (p1 SMALLINT) stored as ORC location '${system:test.tmp.dir}/apps/hive/warehouse/test.db/repairtable_n7_2/'; +CREATE EXTERNAL TABLE repairtable_n7_3(key INT) PARTITIONED BY (p1 INT) stored as ORC location '${system:test.tmp.dir}/apps/hive/warehouse/test.db/repairtable_n7_3/'; +CREATE EXTERNAL TABLE repairtable_n7_4(key INT) PARTITIONED BY (p1 BIGINT) stored as ORC location '${system:test.tmp.dir}/apps/hive/warehouse/test.db/repairtable_n7_4/'; +CREATE EXTERNAL TABLE repairtable_n7_5(key INT) PARTITIONED BY (p1 FLOAT) stored as ORC location '${system:test.tmp.dir}/apps/hive/warehouse/test.db/repairtable_n7_5/'; +CREATE EXTERNAL TABLE repairtable_n7_6(key INT) PARTITIONED BY (p1 DOUBLE) stored as ORC location '${system:test.tmp.dir}/apps/hive/warehouse/test.db/repairtable_n7_6/'; +CREATE EXTERNAL TABLE repairtable_n7_7(key INT) PARTITIONED BY (p1 DECIMAL(10,10)) stored as ORC location '${system:test.tmp.dir}/apps/hive/warehouse/test.db/repairtable_n7_7/'; +CREATE EXTERNAL TABLE repairtable_n7_8(key INT) PARTITIONED BY (p1 string) stored as ORC location '${system:test.tmp.dir}/apps/hive/warehouse/test.db/repairtable_n7_8/'; + +MSCK REPAIR TABLE repairtable_n7_1; +MSCK REPAIR TABLE repairtable_n7_2; +MSCK REPAIR TABLE repairtable_n7_3; +MSCK REPAIR TABLE repairtable_n7_4; +MSCK REPAIR TABLE repairtable_n7_5; +MSCK REPAIR TABLE repairtable_n7_6; +MSCK REPAIR TABLE repairtable_n7_7; +MSCK REPAIR TABLE repairtable_n7_8; + +show partitions repairtable_n7_1; +show partitions repairtable_n7_2; +show partitions repairtable_n7_3; +show partitions repairtable_n7_4; +show partitions repairtable_n7_5; +show partitions repairtable_n7_6; +show partitions repairtable_n7_7; +show partitions repairtable_n7_8; + +dfs ${system:test.dfs.mkdir} -p ${system:test.tmp.dir}/apps/hive/warehouse/test.db/repairtable_n7_1/p1=01; Review comment: Under each numeric table, add another partition dir with same value but different number of preceding or following 0s. It should add only one partition and point to just one directory. Not sure, what is the right behavior in this case but should be well documented. ---------------------------------------------------------------- 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. 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