rdblue commented on code in PR #15006:
URL: https://github.com/apache/iceberg/pull/15006#discussion_r2825047585
##########
core/src/main/java/org/apache/iceberg/MergingSnapshotProducer.java:
##########
@@ -222,7 +225,7 @@ protected boolean addsDataFiles() {
}
protected boolean addsDeleteFiles() {
- return !newDeleteFilesBySpec.isEmpty();
+ return !positionAndEqualityDeletes.isEmpty() ||
!dvsByReferencedFile.isEmpty();
Review Comment:
This isn't entirely correct because it assumes that the lists in
`dvsByReferencedFile` are non-empty. It would probably be better to check:
```java
protected boolean addsDeleteFiles() {
return !positionAndEqualityDeletes.isEmpty()
|| dvsByReferencedFile.values().stream().anyMatch(dvs ->
!dvs.isEmpty());
}
```
--
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]