aokolnychyi commented on code in PR #10123:
URL: https://github.com/apache/iceberg/pull/10123#discussion_r1566282540
##########
core/src/main/java/org/apache/iceberg/BaseRowDelta.java:
##########
@@ -43,6 +43,10 @@ protected BaseRowDelta self() {
@Override
protected String operation() {
+ if (!addsDataFiles() && addsDeleteFiles()) {
+ return DataOperations.DELETE;
+ }
+
Review Comment:
Optional: My personal preference would be to have the negation as the second
argument (or even offer a new method in the parent with the negated meaning)
and combine the two return statements into one. It is completely up to you,
though.
```
if (addsDeleteFiles() && !addsDataFiles()) {
return DataOperations.DELETE;
} else {
return DataOperations.OVERWRITE;
}
```
--
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]