Skip to content
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

Merged

Conversation

smaheshwar-pltr
Copy link
Contributor

@smaheshwar-pltr smaheshwar-pltr commented Feb 1, 2025

The private method TableMetadata::Builder::resetMainBranch used once is equivalent to TableMetadata::Builder::removeRef(SnapshotRef.MAIN_BRANCH), so this PR removes it.

@github-actions github-actions bot added the core label Feb 1, 2025
}

return this;
return removeRef(SnapshotRef.MAIN_BRANCH);
Copy link
Contributor

@ebyhr ebyhr Feb 2, 2025

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.

cc: @amogh-jahagirdar

Copy link
Contributor Author

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

Copy link
Contributor

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! d753324

@smaheshwar-pltr smaheshwar-pltr changed the title Core: Delegate resetMainBranch to removeRef in TableMetadata::Builder Core: Remove TableMetadata::Builder::resetMainBranch Feb 3, 2025
Copy link
Contributor

@amogh-jahagirdar amogh-jahagirdar left a 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

@amogh-jahagirdar amogh-jahagirdar merged commit 1afa0e7 into apache:main Feb 4, 2025
46 checks passed
@smaheshwar-pltr smaheshwar-pltr deleted the delegate-to-remove-ref branch February 4, 2025 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants