sezruby commented on code in PR #18603:
URL: https://github.com/apache/iceberg/pull/18603#discussion_r4381308699
##########
spark/v4.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkPositionDeltaWrite.java:
##########
@@ -285,7 +285,11 @@ public void commit(WriterCommitMessage[] messages,
WriteSummary summary) {
rowDelta.validateFromSnapshot(scan.snapshotId());
}
- if (command == UPDATE || command == MERGE) {
+ if (command == UPDATE) {
+ // data files that the UPDATE does not modify have no rows matching
its condition
+ rowDelta.validateDeletedFiles();
+ rowDelta.validateNoConflictingDeleteFilesForModifiedDataFiles();
Review Comment:
Added updateCommitsWithConcurrentDeleteOfAnotherDataFile to
TestMergeOnReadUpdate and mergeConflictsWithConcurrentDeleteOfAnotherDataFile
to TestMergeOnReadMerge. A shared helper in SparkRowLevelOperationsTestBase
spies on the row delta and commits a delete of another data file right before
the real commit. Reverting the UPDATE branch fails the first test, and moving
MERGE to the new method fails the second.
--
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]