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


##########
spark/v3.4/spark/src/test/java/org/apache/iceberg/spark/source/TestIcebergSourceTablesBase.java:
##########
@@ -1290,6 +1295,12 @@ public void testUnpartitionedPartitionsTable() {
             .set("position_delete_file_count", 0)
             .set("equality_delete_record_count", 0L)
             .set("equality_delete_file_count", 0)
+            .set(
+                "total_data_size_in_bytes",
+                StreamSupport.stream(
+                        
table.currentSnapshot().addedDataFiles(table.io()).spliterator(), false)
+                    .mapToLong(DataFile::fileSizeInBytes)
+                    .sum())

Review Comment:
   probably worth extract a variable instead of inline the computation. 
   
   also I saw you added coverage for unpartitioned table only, shall we also 
add one for partitioned table to make sure it s data size in bytes match for 
each partition?



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