szehon-ho commented on a change in pull request #4310:
URL: https://github.com/apache/iceberg/pull/4310#discussion_r826305130
##########
File path:
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkWrite.java
##########
@@ -277,17 +277,15 @@ public void commit(WriterCommitMessage[] messages) {
IsolationLevel isolationLevel = writeConf.isolationLevel();
Long validateFromSnapshotId = writeConf.validateFromSnapshotId();
+ if (isolationLevel != null && validateFromSnapshotId != null) {
+ dynamicOverwrite.validateFromSnapshot(validateFromSnapshotId);
+ }
+
if (isolationLevel == SERIALIZABLE) {
- if (validateFromSnapshotId != null) {
- dynamicOverwrite.validateFromSnapshot(validateFromSnapshotId);
- }
dynamicOverwrite.validateNoConflictingData();
Review comment:
Thanks yea good catch, I was thinking to leave it here to make it more
clear in each validation mode what we are validating, and maybe there are
future modes where we do not do this as you said. As opposed to the
validationSnapshotId which is the basis of all validations.
--
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]