-
Notifications
You must be signed in to change notification settings - Fork 21
CNDB-13408 Improve BM25 test with better logic #1963
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
Conversation
Code to generate collection values for BM25 test is difficult to follow. This commit refactors the generation code into methods with simpler code. Also this commit removes unused last column in the dataset.
Checklist before you submit for review
|
|
❌ Build ds-cassandra-pr-gate/PR-1963 rejected by Butler1 regressions found Found 1 new test failures
No known test failures found |
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.
Looks good to me. Left two small comments which are a matter of taste and personal opinion so you don't have to act on them if you don't want to. Nothing too important.
The only failed test is unrelated for sure as you are refactoring completely different test.
Fine by me if you want to commit this as-is.
| public static void insertCollectionData(SAITester tester) | ||
| { | ||
| int setsize = 1; | ||
| for (int row = 0; row < DATASET.length; row++) |
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.
I would have probably kept the brace considering the multiline statement, but it is a matter of personal taste. I do not insist on adding anything; I am just expressing my opinion.
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.
I would prefer a better indentation rule inside parentheses.
|
|
||
| public final static Object[][] DATASET = | ||
| { | ||
| { 0, "Climate", 5, "Climate change is a pressing issue. Climate patterns are shifting globally. Scientists study climate data daily.", 1 }, |
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.
This commit is for cleaning/refactoring, why not remove the last two IDE warnings in the test class, too?
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.
I am actually not sure about fixing the warnings. Removing the result type will make the method signature inconsistent.
The second case is on purpose.
Code to generate collection values for BM25 test is difficult to follow. This commit refactors the generation code into methods with simpler code. Also this commit removes unused last column in the dataset.
Code to generate collection values for BM25 test is difficult to follow. This commit refactors the generation code into methods with simpler code. Also this commit removes unused last column in the dataset.



Code to generate collection values for BM25 test is difficult to follow. This commit refactors the generation code into methods with simpler code. Also this commit removes unused last column in the dataset.
The changes were originally implemented in https://github.com/riptano/cndb/pull/13443