kbendick commented on a change in pull request #4310:
URL: https://github.com/apache/iceberg/pull/4310#discussion_r825387293
##########
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:
Nit: It seems like this one is repeated in both cases. Since there's no
existing `else` clause, it's probably not worth reducing the duplication as we
might need more `if` statements but thought I'd call it out.
--
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]