InvisibleProgrammer commented on code in PR #3532: URL: https://github.com/apache/hive/pull/3532#discussion_r952547957
########## ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands2.java: ########## @@ -3264,6 +3264,37 @@ public void testNoTxnComponentsForScheduledQueries() throws Exception { Assert.assertEquals(resData, stringifyValues(actualData)); } + @Test + public void testCompactionOutputDirectoryNamesOnPartitions() throws Exception { + String p1 = "p=p1"; + String p2 = "p=p2"; + String expectedDelta1 = p1 + "/delta_0000001_0000002_v0000021"; + String expectedDelta2 = p2 + "/delta_0000003_0000004_v0000022"; + + runStatementOnDriver("insert into " + Table.ACIDTBLPART + " partition(p='p1') (a,b) values(1,2)"); + runStatementOnDriver("insert into " + Table.ACIDTBLPART + " partition(p='p1') (a,b) values(3,4)"); + runStatementOnDriver("insert into " + Table.ACIDTBLPART + " partition(p='p2') (a,b) values(1,2)"); + runStatementOnDriver("insert into " + Table.ACIDTBLPART + " partition(p='p2') (a,b) values(3,4)"); + + compactPartition(Table.ACIDTBLPART.name().toLowerCase(), CompactionType.MINOR, p1); + compactPartition(Table.ACIDTBLPART.name().toLowerCase(), CompactionType.MINOR, p2); + + FileSystem fs = FileSystem.get(hiveConf); + String tablePath = getWarehouseDir() + "/" + Table.ACIDTBLPART.name().toLowerCase() + "/"; + + Assert.assertTrue(fs.exists(new Path(tablePath + expectedDelta1))); + Assert.assertTrue(fs.exists(new Path(tablePath + expectedDelta2))); Review Comment: Extra asserts added. -- 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