ajantha-bhat commented on code in PR #1508:
URL: https://github.com/apache/polaris/pull/1508#discussion_r2072764619


##########
quarkus/service/src/test/java/org/apache/polaris/service/quarkus/task/BatchFileCleanupTaskHandlerTest.java:
##########
@@ -156,18 +173,21 @@ public void close() {
               firstMetadata,
               firstMetadataFile,
               List.of(statisticsFile2),
+              List.of(partitionStatisticsFile2),
               snapshot2);
       assertThat(TaskUtils.exists(firstMetadataFile, fileIO)).isTrue();
       assertThat(TaskUtils.exists(secondMetadataFile, fileIO)).isTrue();
 
       List<String> cleanupFiles =
-          Stream.concat(
-                  secondMetadata.previousFiles().stream()
-                      .map(TableMetadata.MetadataLogEntry::file)
-                      .filter(file -> TaskUtils.exists(file, fileIO)),
-                  secondMetadata.statisticsFiles().stream()
-                      .map(StatisticsFile::path)
-                      .filter(file -> TaskUtils.exists(file, fileIO)))
+          Stream.of(
+                  
secondMetadata.previousFiles().stream().map(TableMetadata.MetadataLogEntry::file),
+                  
secondMetadata.statisticsFiles().stream().map(StatisticsFile::path),
+                  firstMetadata.partitionStatisticsFiles().stream()

Review Comment:
   Only the `secondMetadata. partitionStatisticsFiles()` is enough here as it 
contains the entries for all the snapshots? 
   
   similar to statisticsFiles() that exists already. 



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

Reply via email to