deniskuzZ commented on a change in pull request #2086:
URL: https://github.com/apache/hive/pull/2086#discussion_r599412816



##########
File path: ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommands3.java
##########
@@ -463,6 +463,48 @@ public void testCompactionAbort() throws Exception {
     runCleaner(hiveConf);
   }
 
+
+  @Test
+  public void testCompactionAbortLeftoverFiles() throws Exception {
+    MetastoreConf.setBoolVar(hiveConf, 
MetastoreConf.ConfVars.CREATE_TABLES_AS_ACID, true);
+    
+    dropTable(new String[] {"T"});
+    //note: transaction names T1, T2, etc below, are logical, the actual txnid 
will be different
+    runStatementOnDriver("create table T (a int, b int) stored as orc");
+    runStatementOnDriver("insert into T values(0,2)");//makes delta_1_1 in T1
+    runStatementOnDriver("insert into T values(1,4)");//makes delta_2_2 in T2
+
+    //create failed compaction attempt so that compactor txn is aborted
+    HiveConf.setBoolVar(hiveConf, 
HiveConf.ConfVars.HIVETESTMODEFAILAFTERCOMPACTION, true);
+    runStatementOnDriver("alter table T compact 'major'");

Review comment:
       Can't see in the test where do you produce delete deltas. Could you 
please add an "update" statement? 




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to