ebyhr commented on code in PR #12149: URL: https://github.com/apache/iceberg/pull/12149#discussion_r1938612158
########## core/src/main/java/org/apache/iceberg/TableMetadata.java: ########## @@ -1310,13 +1310,7 @@ public Builder removeRef(String name) { } private Builder resetMainBranch() { - this.currentSnapshotId = -1; - SnapshotRef ref = refs.remove(SnapshotRef.MAIN_BRANCH); - if (ref != null) { - changes.add(new MetadataUpdate.RemoveSnapshotRef(SnapshotRef.MAIN_BRANCH)); - } - - return this; + return removeRef(SnapshotRef.MAIN_BRANCH); Review Comment: I think we can remove `resetMainBranch` method now. The logic between `removeRef(SnapshotRef.MAIN_BRANCH)` and `resetMainBranch()` were different until #11779. -- 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