namrathamyske commented on code in PR #4926:
URL: https://github.com/apache/iceberg/pull/4926#discussion_r936051213


##########
core/src/main/java/org/apache/iceberg/SnapshotProducer.java:
##########
@@ -167,8 +200,7 @@ protected void validate(TableMetadata currentMetadata) {
   @Override
   public Snapshot apply() {
     refresh();
-    Long parentSnapshotId = base.currentSnapshot() != null ?
-        base.currentSnapshot().snapshotId() : null;
+    Long parentSnapshotId = base.ref(targetBranch) != null ? 
base.ref(targetBranch).snapshotId() : null;
     long sequenceNumber = base.nextSequenceNumber();
 
     // run validations from the child operation

Review Comment:
   @rdblue My thought process is to check the whether starting snapshot ID is 
an ancestor of parent snapshot. If not then throw invalid starting snapshot ID 
exception. Else we should go ahead with checking between starting snapshot ID  
& parent ID.



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