sezruby commented on code in PR #18603:
URL: https://github.com/apache/iceberg/pull/18603#discussion_r4385013130
##########
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:
Added `updateConflictsWithConcurrentDeleteOfUpdatedRow` in 62e61d05: it runs
`UPDATE ... WHERE id = 1` against `tableWithConcurrentDelete(dataFile, 0L)` and
asserts the "Found new conflicting delete files" failure. Removing the
`validateNoConflictingDeleteFilesForModifiedDataFiles` call for UPDATE now
fails it.
--
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]