stevenzwu commented on code in PR #11948: URL: https://github.com/apache/iceberg/pull/11948#discussion_r1931437767
########## core/src/main/java/org/apache/iceberg/SnapshotProducer.java: ########## @@ -290,7 +298,27 @@ public Snapshot apply() { operation(), summary(base), base.currentSchemaId(), - manifestList.location()); + manifestList.location(), + lastRowId, + addedRows); + } + + private Long calculateAddedRows(List<ManifestFile> manifests) { + return manifests.stream() + .filter( + manifest -> + manifest.snapshotId() == null + || Objects.equals(manifest.snapshotId(), this.snapshotId)) Review Comment: should we use `snapshotId()` method (instead of `this.snapshotId`)? there is no practical difference, since earlier call of `snapshotId()` already set it. but it is probably better for safety to avoid such implicit code ordering dependency -- 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