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


##########
core/src/test/java/org/apache/iceberg/TableTestBase.java:
##########
@@ -349,6 +349,35 @@ void validateSnapshot(Snapshot old, Snapshot snap, long 
sequenceNumber, DataFile
     validateSnapshot(old, snap, (Long) sequenceNumber, newFiles);
   }
 
+  Snapshot commit(Table tbl, SnapshotUpdate snapshotUpdate, String branch) {
+    Snapshot snapshot = null;
+
+    if (branch.equals(SnapshotRef.MAIN_BRANCH)) {
+      snapshotUpdate.commit();
+      snapshot = tbl.currentSnapshot();
+    } else {
+      ((SnapshotProducer) snapshotUpdate.toBranch(branch)).commit();

Review Comment:
   AppendFiles doesn't extend SnapshotProducer, so the casting would just have 
to shift to the caller.



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