aokolnychyi commented on a change in pull request #3945:
URL: https://github.com/apache/iceberg/pull/3945#discussion_r791198640



##########
File path: 
core/src/test/java/org/apache/iceberg/TestOverwriteWithValidation.java
##########
@@ -333,6 +333,31 @@ public void 
testOverwriteCompatibleAdditionStrictValidated() {
         committedSnapshotId, table.currentSnapshot().snapshotId());
   }
 
+  @Test
+  public void testOverwriteCompatibleAdditionStrictValidatedNoConflict() {

Review comment:
       Well, I am not sure I understand this completely.
   
   Under the current implementation, this test would throw a validation 
exception as the conflict detection filter is `true`. That means any concurrent 
modification should be considered a conflict. I think that's the correct 
behavior. It will happen if a row-level operation did not have a predicate that 
could be pushed down. For instance, `UPDATE t SET col = 1`. Any append should 
be considered a conflict in this case. Otherwise, suppose we had only files in 
partition B and then got an UPDATE statement without a condition. While 
executing the UPDATE statement, someone concurrently added new files to 
partition A. The UPDATE will be deleting files from partition B but the 
concurrently added files to partition A should still fail the operation.
   
   @coolderli, will adding a partition predicate to you MERGE statement solve 
the issue? You can provide a predicate in the ON condition and that will be 
used as the conflict detection filter.




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