ajantha-bhat commented on code in PR #6267:
URL: https://github.com/apache/iceberg/pull/6267#discussion_r1038756796


##########
core/src/test/java/org/apache/iceberg/TestTableMetadata.java:
##########
@@ -1274,20 +1275,20 @@ public void testSetStatistics() {
     Assert.assertEquals("Statistics file snapshot", 43L, 
statisticsFile.snapshotId());
     Assert.assertEquals("Statistics file path", "/some/path/to/stats/file", 
statisticsFile.path());
 
-    TableMetadata withStatisticsReplaced =
+    TableMetadata withStatisticsAppended =
         TableMetadata.buildFrom(withStatistics)
             .setStatistics(
                 43,
                 new GenericStatisticsFile(
                     43, "/some/path/to/stats/file2", 128, 27, 
ImmutableList.of()))
             .build();
 
-    Assertions.assertThat(withStatisticsReplaced.statisticsFiles())
-        .as("There should be one statistics file registered")
-        .hasSize(1);
-    statisticsFile = 
Iterables.getOnlyElement(withStatisticsReplaced.statisticsFiles());
-    Assert.assertEquals("Statistics file snapshot", 43L, 
statisticsFile.snapshotId());
-    Assert.assertEquals("Statistics file path", "/some/path/to/stats/file2", 
statisticsFile.path());
+    Assertions.assertThat(withStatisticsAppended.statisticsFiles())
+        .as("There should be two statistics files registered")
+        .hasSize(2)

Review Comment:
   As I fixed the overwrite to append. There will be two stats file for this 
snapshot id. Hence, updated the testcases. 



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to