openinx commented on a change in pull request #2865:
URL: https://github.com/apache/iceberg/pull/2865#discussion_r676569195
##########
File path: core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java
##########
@@ -322,31 +365,25 @@ protected void validateDataFilesExist(TableMetadata base,
Long startingSnapshotI
if (matchingOperations.contains(currentSnapshot.operation())) {
newSnapshots.add(currentSnapshotId);
- for (ManifestFile manifest : currentSnapshot.dataManifests()) {
- if (manifest.snapshotId() == (long) currentSnapshotId) {
- manifests.add(manifest);
+ if (content == ManifestContent.DATA) {
+ for (ManifestFile manifest : currentSnapshot.dataManifests()) {
+ if (manifest.snapshotId() == (long) currentSnapshotId) {
Review comment:
Is it possible that the `manifest.snapshotId()` returns a `null` value
? If so, then we'd better to change this line to
`Objects.equals(manifest.snapshotId(), currentSnapshotId)` ?
--
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]