ajantha-bhat commented on code in PR #8854:
URL: https://github.com/apache/iceberg/pull/8854#discussion_r1362069529


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/procedures/FastForwardBranchProcedure.java:
##########
@@ -77,9 +77,9 @@ public InternalRow[] call(InternalRow args) {
     return modifyIcebergTable(
         tableIdent,
         table -> {
-          long currentRef = table.currentSnapshot().snapshotId();
+          long currentRef = table.snapshot(source).snapshotId();

Review Comment:
   Yeah, I also couldn't conclude on the implications. All these days, if the 
snapshot id is -1, we assume that it is an empty  table or just create table 
happened. 
   
   We also need a dummy snapshot id for ancestor check to be passed for fast 
forward operations. 
   Nessie uses a **constant** default hash for on empty branch for handling 
this kind of ancestor problems. Maybe we need to introduce something like that. 



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