rdblue commented on a change in pull request #2925:
URL: https://github.com/apache/iceberg/pull/2925#discussion_r711814436
##########
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:
You might consider doing this differently. Maybe accept a write option
that sets the starting snapshot ID for now? Defaulting this to the current
snapshot as of the time that the dynamic overwrite is created seems unreliable
to me.
--
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]