-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Remove TableMetadata::Builder::resetMainBranch
#12149
Core: Remove TableMetadata::Builder::resetMainBranch
#12149
Conversation
546fab7
to
6af6913
Compare
} | ||
|
||
return this; | ||
return removeRef(SnapshotRef.MAIN_BRANCH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could remove resetMainBranch
method. The logic between removeRef(SnapshotRef.MAIN_BRANCH)
and resetMainBranch()
were different until #11779. They are same now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes - happy to make this change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! d753324
resetMainBranch
to removeRef
in TableMetadata::Builder
TableMetadata::Builder::resetMainBranch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @smaheshwar-pltr @ebyhr ! I'll leave it open for a bit in case others had any thoughts
The private method
TableMetadata::Builder::resetMainBranch
used once is equivalent toTableMetadata::Builder::removeRef(SnapshotRef.MAIN_BRANCH)
, so this PR removes it.