ajantha-bhat commented on code in PR #13163:
URL: https://github.com/apache/iceberg/pull/13163#discussion_r2111918206
##########
core/src/main/java/org/apache/iceberg/PartitionStatsHandler.java:
##########
@@ -336,16 +336,29 @@ private static PartitionMap<PartitionStats>
computeStatsDiff(
Sets.newHashSet(
SnapshotUtil.ancestorIdsBetween(
toSnapshot.snapshotId(), fromSnapshot.snapshotId(),
table::snapshot));
- Predicate<ManifestFile> manifestFilePredicate =
- manifestFile -> snapshotIdsRange.contains(manifestFile.snapshotId());
- return computeStats(table, toSnapshot, manifestFilePredicate, true /*
incremental */);
+ return computeStats(table, toSnapshot, snapshotIdsRange);
}
private static PartitionMap<PartitionStats> computeStats(
- Table table, Snapshot snapshot, Predicate<ManifestFile> predicate,
boolean incremental) {
+ Table table, Snapshot snapshot, Set<Long> snapshotIdsRange) {
Review Comment:
Done.
I had considered it earlier as well, but decided to leave it as-is since I
felt I might be overthinking the refactoring of this private method. But it
makes sense now as it is very clean now.
--
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]