RussellSpitzer commented on a change in pull request #2508:
URL: https://github.com/apache/iceberg/pull/2508#discussion_r635692446



##########
File path: 
spark/src/test/java/org/apache/iceberg/actions/TestRewriteDataFilesAction.java
##########
@@ -347,15 +348,19 @@ public void testRewriteDataFilesForLargeFile() throws 
AnalysisException {
 
     Actions actions = Actions.forTable(table);
 
-    long targetSizeInBytes = maxSizeFile.fileSizeInBytes() - 10;
+    long targetSizeInBytes = maxSizeFile.fileSizeInBytes() / 2;
     RewriteDataFilesActionResult result = actions
         .rewriteDataFiles()
         .targetSizeInBytes(targetSizeInBytes)
         .splitOpenFileCost(1)
         .execute();
 
-    Assert.assertEquals("Action should delete 4 data files", 4, 
result.deletedDataFiles().size());
-    Assert.assertEquals("Action should add 2 data files", 2, 
result.addedDataFiles().size());
+    // 1 big datafile and 2 small datafiles
+    Assert.assertEquals("Action should delete 3 data files", 3, 
result.deletedDataFiles().size());
+
+    // The 2 small datafiles will be rewrote to 1 datafile, the big datafile 
will be rewrite to 2 datafiles,

Review comment:
       will be rewrote -> will be rewritten
   will be rewrite -> will be rewritten




-- 
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