Skip to content

Conversation

@k-rus
Copy link

@k-rus k-rus commented Aug 25, 2025

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

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.
@k-rus k-rus requested a review from a team August 25, 2025 10:05
@github-actions
Copy link

github-actions bot commented Aug 25, 2025

Checklist before you submit for review

  • This PR adheres to the Definition of Done
  • Make sure there is a PR in the CNDB project updating the Converged Cassandra version
  • Use NoSpamLogger for log lines that may appear frequently in the logs
  • Verify test results on Butler
  • Test coverage for new/modified code is > 80%
  • Proper code formatting
  • Proper title for each commit staring with the project-issue number, like CNDB-1234
  • Each commit has a meaningful description
  • Each commit is not very long and contains related changes
  • Renames, moves and reformatting are in distinct commits
  • All new files should contain the DataStax copyright header instead of the Apache License one

@sonarqubecloud
Copy link

@cassci-bot
Copy link

❌ Build ds-cassandra-pr-gate/PR-1963 rejected by Butler


1 regressions found
See build details here


Found 1 new test failures

Test Explanation Runs Upstream
o.a.c.index.sai.cql.VectorKeyRestrictedOnPartitionTest.partitionRestrictedWidePartitionBqCompressedTest[ca] REGRESSION 🔴 0 / 18

No known test failures found

@ekaterinadimitrova2 ekaterinadimitrova2 requested review from ekaterinadimitrova2 and removed request for a team August 25, 2025 16:29
Copy link

@ekaterinadimitrova2 ekaterinadimitrova2 left a 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++)

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.

Copy link
Author

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 },

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?

Copy link
Author

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.

@k-rus k-rus merged commit 1226594 into main Aug 25, 2025
490 of 495 checks passed
@k-rus k-rus deleted the rf-13408-move-bm25-improvements branch August 25, 2025 18:46
djatnieks pushed a commit that referenced this pull request Sep 2, 2025
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.
djatnieks pushed a commit that referenced this pull request Sep 4, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants