yushesp commented on code in PR #15928:
URL: https://github.com/apache/iceberg/pull/15928#discussion_r3070712442
##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/procedures/FastForwardBranchProcedure.java:
##########
@@ -82,12 +84,18 @@ public InternalRow[] call(InternalRow args) {
return modifyIcebergTable(
tableIdent,
table -> {
- Long snapshotBefore =
- table.snapshot(from) != null ? table.snapshot(from).snapshotId()
: null;
+ Snapshot snapshotBefore = table.snapshot(from);
table.manageSnapshots().fastForwardBranch(from, to).commit();
Review Comment:
Good point, got a NPE but looks like it was due to a different issue. After
a successful commit the ref is guaranteed to resolve. I'll go ahead and close
this PR 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]