-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
HHH-19284 : Refactor - Extract duplicated vector distance function registration #9904
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! This pull request appears to follow the contribution rules. › This message was automatically generated. |
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.
Hello @0xC0FFE2 ,
Thanks for your contribution.
While I agree your code is a slight improvement, I want to stress that refactoring for the sake of it is not something the whole Hibernate team sees with a good eye, especially if it's just some very localized problem: the cost of doing that refactoring and reviewing it often outweighs the benefits.
I'm ready to merge this, but:
- If you are looking for ways to contribute to Hibernate, please have a look at the good first issues.
- Please rebase your branch on the main branch to remove the "merge commit" -- we don't allow those.
I for one would not merge this, not unless a similar change is done in the |
Hello , @yrodiere @gavinking I apologize for the inconsistency in my initial PR. Per the reviewers' feedback, I've now refactored all FunctionContributor classes to ensure consistency
For the other VectorContributor classes, I've decided to keep them in their current state as they are already concise and clearly structured. Applying similar refactoring would actually increase code length and complexity without significant benefits. I've also rebased my branch on the main branch to remove the merge commit as requested. Thank you for your detailed feedback. |
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.
Thank you. Please don't use spaces for indentation though -- not because one or the other is better, but for consistency with the rest of the codebase.
See:
https://github.com/hibernate/hibernate-orm/blob/main/CONTRIBUTING.md#getting-started
https://hibernate.org/community/contribute/intellij-idea/
693ab35
to
37437d9
Compare
Thank you for pointing this out. I've updated the code to use tabs instead of spaces for indentation to match the project's coding style. I'll make sure to follow the contribution guidelines more carefully in the futurre |
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.
LGTM, thanks for the cleanup.
Though as I said above... next time you want to contribute, please consider having a look at the good first issues instead :)
thanks. |
Looks like format checks are still failing? Probably some trailing tabs/spaces at the end of lines, or missing line break at the end of a file? See below. I think just running a build locally should automatically fix your format issues:
|
I ran ./gradlew build -x test as you suggested. Thanks and sorry for the format error. |
Extracted duplicated vector distance function registration code into a helper method to improve code clarity and maintenance.
https://hibernate.atlassian.net/browse/HHH-19284
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.