Skip to content

Conversation

driftx
Copy link

@driftx driftx commented Sep 11, 2025

What is the issue

Multi-column partition keys generate invalid CQL

What does this PR fix and why was it fixed

Fix multi-column partition key CQL generation in DataRange.toCQLString()

When isSinglePartition() is true for composite partition keys, generate valid CQL like "k1 = 1 AND k2 = 2" instead of invalid "k1, k2 = 1, 2".

Adds test coverage for multi-column partition key scenarios.

Copy link

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

Copy link

@driftx driftx requested a review from djatnieks September 11, 2025 14:58
Copy link

@djatnieks djatnieks left a comment

Choose a reason for hiding this comment

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

Check if the regressions reported by Butler for ReadCommandTest.testToCQLString and AbstractReadQueryToCQLStringTest might be related to these changes or are something else.

@driftx
Copy link
Author

driftx commented Sep 11, 2025

Those are the ones that will get fixed in #15304 which needs this.

@driftx driftx merged commit 35b1989 into main-5.0 Sep 11, 2025
574 of 593 checks passed
@driftx driftx deleted the CNDB-15321 branch September 11, 2025 15:51
@driftx
Copy link
Author

driftx commented Sep 11, 2025

Looking more closely, you were correct. I'll include the simple fix in 15304.

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.

3 participants