pvary commented on code in PR #14581:
URL: https://github.com/apache/iceberg/pull/14581#discussion_r2524307614


##########
core/src/main/java/org/apache/iceberg/BaseRowDelta.java:
##########
@@ -48,6 +48,10 @@ protected BaseRowDelta self() {
 
   @Override
   protected String operation() {
+    if (addsDataFiles() && !addsDeleteFiles() && !deletesDataFiles()) {

Review Comment:
   Good point @singhpk234!
   
   In this case the other condition is bugous:
   ```
       if (addsDeleteFiles() && !addsDataFiles()) {
         return DataOperations.DELETE;
       }
   ```
   We could add back data with `removeDeletes`.
   
   To make things even more problematic, in V3 we will have DV updates which is 
likely a `deleteDeleteFile(DV1)`  + an `addDeleteFile(DV2)`. But nothing 
guarantees in this case that only new deletes happen. Theoretically this could 
bring back new records.
   
   So this means that @mxm's change is correct, but likely the other path where 
we fall back to `DataOperations.DELETE` is problematic
   
   
   



-- 
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]

Reply via email to