@@ -1320,6 +1320,34 @@ public void testParallelPartialProgressWithMaxFailedCommits() {
1320
1320
shouldHaveACleanCache (table );
1321
1321
}
1322
1322
1323
+ @ TestTemplate
1324
+ public void testParallelPartialProgressWithMaxFailedCommitsLargerThanTotalFileGroup () {
1325
+ Table table = createTable (20 );
1326
+ int fileSize = averageFileSize (table );
1327
+
1328
+ List <Object []> originalData = currentData ();
1329
+
1330
+ RewriteDataFilesSparkAction rewrite =
1331
+ basicRewrite (table )
1332
+ .option (
1333
+ RewriteDataFiles .MAX_FILE_GROUP_SIZE_BYTES , Integer .toString (fileSize * 2 + 1000 ))
1334
+ .option (RewriteDataFiles .MAX_CONCURRENT_FILE_GROUP_REWRITES , "3" )
1335
+ .option (RewriteDataFiles .PARTIAL_PROGRESS_ENABLED , "true" )
1336
+ // Since we can have at most one commit per file group and there are only 10 file
1337
+ // groups, actual number of commits is 10
1338
+ .option (RewriteDataFiles .PARTIAL_PROGRESS_MAX_COMMITS , "20" )
1339
+ .option (RewriteDataFiles .PARTIAL_PROGRESS_MAX_FAILED_COMMITS , "0" );
1340
+ rewrite .execute ();
1341
+
1342
+ table .refresh ();
1343
+
1344
+ List <Object []> postRewriteData = currentData ();
1345
+ assertEquals ("We shouldn't have changed the data" , originalData , postRewriteData );
1346
+ shouldHaveSnapshots (table , 11 );
1347
+ shouldHaveNoOrphans (table );
1348
+ shouldHaveACleanCache (table );
1349
+ }
1350
+
1323
1351
@ TestTemplate
1324
1352
public void testInvalidOptions () {
1325
1353
Table table = createTable (20 );
0 commit comments