nastra commented on code in PR #8854:
URL: https://github.com/apache/iceberg/pull/8854#discussion_r1403186632


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/procedures/FastForwardBranchProcedure.java:
##########
@@ -77,12 +79,13 @@ public InternalRow[] call(InternalRow args) {
     return modifyIcebergTable(
         tableIdent,
         table -> {
-          long currentRef = table.currentSnapshot().snapshotId();
+          Snapshot currentSnapshot = table.snapshot(source);
+          Preconditions.checkArgument(
+              currentSnapshot != null, "Branch to fast forward does not exist: 
%s", source);

Review Comment:
   minor: would it make sense to say `Branch to fast-forward...` here rather 
than `Branch to fast forward...`?



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to