aokolnychyi commented on code in PR #9050:
URL: https://github.com/apache/iceberg/pull/9050#discussion_r1393606348


##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java:
##########
@@ -390,7 +390,7 @@ private Expression conflictDetectionFilter() {
         filter = Expressions.and(filter, expr);
       }
 
-      return filter;
+      return SERIALIZABLE == isolationLevel ? Expressions.alwaysTrue() : 
filter;

Review Comment:
   Here is the primary question. Are these statements equivalent?
   
   ```
   MERGE INTO t USING (SELECT 1005 as id, 2 as class, SUM(value)  as value FROM 
t WHERE class = 1) AS u
   ON t.id = u.id
   WHEN MATCHED THEN UPDATE SET t.value = u.value
   WHEN NOT MATCHED THEN INSERT (id, class, value) VALUES (u.id, u.class, 
u.value)
   ```
   
   ```
   MERGE INTO t USING (2 as class, SUM(value)  as value FROM t WHERE class = 1) 
AS u
   ON t.id = 1005
   WHEN MATCHED THEN UPDATE SET t.value = u.value
   WHEN NOT MATCHED THEN INSERT (id, class, value) VALUES (1005, u.class, 
u.value)
   ```
   
   I think they would produce the same output.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to