szehon-ho commented on a change in pull request #2925:
URL: https://github.com/apache/iceberg/pull/2925#discussion_r714233353



##########
File path: spark3/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java
##########
@@ -138,7 +140,10 @@ BatchWrite asBatchAppend() {
   }
 
   BatchWrite asDynamicOverwrite() {
-    return new DynamicOverwrite();
+    String isolationLevelAsString = 
table.properties().getOrDefault(REPLACE_PARTITION_LEVEL,
+        REPLACE_PARTITION_LEVEL_DEFAULT);
+    IsolationLevel level = 
IsolationLevel.valueOf(isolationLevelAsString.toUpperCase(Locale.ROOT));
+    return new DynamicOverwrite(level, table.currentSnapshot().snapshotId());

Review comment:
       Got it, I implemented the suggestion (taking your example from 
https://github.com/apache/iceberg/pull/3069#discussion_r711803863), and added a 
Spark level unit test




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