Skip to content

Conversation

adelapena
Copy link

What is the issue

Testing of CNDB-15280 has revealed that the output of AbstractReadQuery.toCQLString is frequently invalid CQL.

What does this PR fix and why was it fixed

This PR fixes AbstractReadQuery.toCQLString` to produce output that is as close to valid CQL as possible.

The output cannot always be entirely valid CQL because:

  • MultiRangeReadCommand doesn't translate to any semantically valid CQL due to the multiple token ranges, although we can still produce syntactically valid CQL.
  • Long queried column values are truncated to save space and be less distracting.

This is closely related to CNDB-15280, which testing exposes most of the issues fixed here, so both issues should be blocked on each other.

Fixes for toCQLString mainly coming from CASSANDRA-16510,
and removal of code duplication.
@adelapena adelapena self-assigned this Oct 21, 2025
@github-actions
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

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.

2 participants