huaxingao commented on code in PR #18603:
URL: https://github.com/apache/iceberg/pull/18603#discussion_r4445349500
##########
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) {
Review Comment:
With this change, UPDATE becomes less strict, even in SERIALIZABLE mode (the
default).
Example: `UPDATE t SET has_child = true WHERE id = 1 AND EXISTS (SELECT 1
FROM t WHERE parent = 1)`. The UPDATE reads the child row through the subquery,
but does not change it. If another job deletes the child row at the same time,
the old check fails the UPDATE. The new check does not, so the UPDATE commits
even though the child is gone.
@amogh-jahagirdar what do you think?
--
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]