amogh-jahagirdar commented on code in PR #8854:
URL: https://github.com/apache/iceberg/pull/8854#discussion_r1361985873


##########
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();
           table.manageSnapshots().fastForwardBranch(source, target).commit();

Review Comment:
   Another thing to fix....I think when I originally implemented the 
fastForward operation I switched the definitions of source/target in my head so 
the API is confusing (in the API, target means the branch that is actually 
being fast forwarded, source is where target will be moved). That should 
probably be reversed so target is actually the target to which source will be 
moved.
   
   I *think* we should be able to safely just rename the parameters in the API 
and update the javadoc. Luckily both are String parameters.



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