rdblue commented on a change in pull request #3213:
URL: https://github.com/apache/iceberg/pull/3213#discussion_r720850246
##########
File path: core/src/main/java/org/apache/iceberg/RemoveSnapshots.java
##########
@@ -359,10 +361,24 @@ private void removeExpiredFiles(List<Snapshot> snapshots,
Set<Long> validIds, Se
}
}
});
- deleteDataFiles(manifestsToScan, manifestsToRevert, validIds);
- deleteMetadataFiles(manifestsToDelete, manifestListsToDelete);
+ if (cleanExpiredFiles) {
+ deleteDataFiles(manifestsToScan, manifestsToRevert, validIds);
+ deleteMetadataFiles(manifestsToDelete, manifestListsToDelete);
+ } else {
+ Set<String> filesToDelete = findFilesToDelete(manifestsToScan,
manifestsToRevert, validIds);
+ expireSnapshotResult = ExpireSnapshotResult
+ .builder()
+ .addManifestFiles(manifestsToDelete)
+ .addManifestListFiles(manifestListsToDelete)
+ .addDataFiles(filesToDelete)
+ .build();
+ }
}
+ public ExpireSnapshotResult getExpiredSnapshotResult() {
Review comment:
Iceberg doesn't use `get` in method names because it signals that either
there is a better noun (like find) or it is unnecessary and should be omitted.
--
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]