vanliu-tx commented on code in PR #4514:
URL: https://github.com/apache/iceberg/pull/4514#discussion_r850044302
##########
core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java:
##########
@@ -690,7 +690,7 @@ public List<ManifestFile> apply(TableMetadata base) {
base.schema(), current != null ? current.dataManifests() : null);
long minDataSequenceNumber = filtered.stream()
.map(ManifestFile::minSequenceNumber)
- .filter(seq -> seq > 0) // filter out unassigned sequence numbers in
rewritten manifests
+ .filter(seq -> seq >= 0) // filter out unassigned sequence numbers in
rewritten manifests
Review Comment:
some manifest file's minSequenceNumber is -1, if we remove this line, the
minDataSequenceNumber will be -1 in some cases, and fail the validation in
dropDeleteFilesOlderThan().
```
protected void dropDeleteFilesOlderThan(long sequenceNumber) {
Preconditions.checkArgument(sequenceNumber >= 0,
"Invalid minimum data sequence number: %s", sequenceNumber);
this.minSequenceNumber = sequenceNumber;
}
```
--
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]