dramaticlly commented on code in PR #7920:
URL: https://github.com/apache/iceberg/pull/7920#discussion_r1253439921


##########
spark/v3.4/spark/src/test/java/org/apache/iceberg/spark/source/TestIcebergSourceTablesBase.java:
##########
@@ -2223,4 +2254,36 @@ private DeleteFile writeEqDeleteFile(Table table) {
       throw new RuntimeException(e);
     }
   }
+
+  private long sumDataFileSizeInBytes(Iterable<DataFile> dataFiles) {
+    return StreamSupport.stream(dataFiles.spliterator(), false)
+        .mapToLong(DataFile::fileSizeInBytes)
+        .sum();
+  }
+
+  private List<DataFile> listDataFilesFromCommitId(Table table, long commitId) 
{
+    return StreamSupport.stream(
+            table.snapshot(commitId).addedDataFiles(table.io()).spliterator(), 
false)
+        .collect(Collectors.toList());
+  }
+
+  private void assertPartitionIdFromDataFiles(
+      List<DataFile> dataFilesFromFirstCommit, List<DataFile> 
dataFilesFromSecondCommit) {

Review Comment:
   I am thinking if we write the helper method this way, then it probably 
cannot be reused. I would suggest to put assertion expected value as parameters 
(like numberOfDataFiles and partitionValue), everything else looks good to me



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

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