wombatu-kun commented on code in PR #18603:
URL: https://github.com/apache/iceberg/pull/18603#discussion_r4384536276


##########
spark/v4.2/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMergeOnReadUpdate.java:
##########
@@ -52,6 +54,29 @@ protected Map<String, String> extraTableProperties() {
         TableProperties.UPDATE_MODE, 
RowLevelOperationMode.MERGE_ON_READ.modeName());
   }
 
+  @TestTemplate
+  void updateCommitsWithConcurrentDeleteOfAnotherDataFile() throws IOException 
{
+    createAndInitTable("id INT, dep STRING");
+    append(tableName, "{ \"id\": 1, \"dep\": \"hr\" }");
+    Table table = validationCatalog.loadTable(tableIdent);
+    DataFile dataFile =
+        Iterables.getOnlyElement(
+            SnapshotChanges.builderFor(table)
+                .snapshot(table.currentSnapshot())
+                .build()
+                .addedDataFiles());
+    createBranchIfNeeded();
+    append(commitTarget(), "{ \"id\": 2, \"dep\": \"hr\" }");
+
+    sql("UPDATE %s SET dep = 'it' WHERE id = 2", 
tableWithConcurrentDelete(dataFile, 0L));

Review Comment:
   This pins only the commit side: removing the 
validateNoConflictingDeleteFilesForModifiedDataFiles call for UPDATE in 
SparkPositionDeltaWrite still leaves every test green. Could a second test run 
UPDATE ... WHERE id = 1 against tableWithConcurrentDelete(dataFile, 0L), so the 
concurrent delete hits the row being updated, and assert the "Found new 
conflicting delete files" failure?



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