amogh-jahagirdar commented on code in PR #12149:
URL: https://github.com/apache/iceberg/pull/12149#discussion_r1939597352
##########
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:
Good find, yes I don't see a good reason to keep `resetMainBranch` around
anymore especially since it's a private method. let's just remove it!
--
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]