Skip to content

Conversation

@driftx
Copy link

@driftx driftx commented Aug 27, 2025

What is the issue

After CNDB-15000, cql string generation for read commands with clustering columns needs to be fixed, and value truncation is not working.

What does this PR fix and why was it fixed

Refactor CQL string generation in PartitionRangeReadCommand and SinglePartitionReadCommand
to properly handle the interaction between row filters and clustering filters. This prevents
duplication of clustering column conditions when both regular filters and clustering
restrictions are present, particularly in queries using ALLOW FILTERING or secondary indexes
on clustering columns.
Fix value truncation in RowFilter CQL string generation.

@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

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.

A couple comments for consideration.

driftx added 2 commits August 28, 2025 05:58
…ng filters

Refactor CQL string generation in PartitionRangeReadCommand and SinglePartitionReadCommand
to properly handle the interaction between row filters and clustering filters. This prevents
duplication of clustering column conditions when both regular filters and clustering
restrictions are present, particularly in queries using ALLOW FILTERING or secondary indexes
on clustering columns.
@sonarqubecloud
Copy link

@cassci-bot
Copy link

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


8 regressions found
See build details here


Found 8 new test failures

Test Explanation Runs Upstream
o.a.c.cql3.CqlBuilderTest.testAppendOptionsChaining (compression) REGRESSION 🔴🔴 0 / 1
o.a.c.cql3.CqlBuilderTest.testAppendOptionsSortsMapKeys (compression) REGRESSION 🔴🔴 0 / 1
o.a.c.cql3.CqlBuilderTest.testAppendOptionsWithEmptyOptions (compression) REGRESSION 🔴🔴 0 / 1
o.a.c.cql3.CqlBuilderTest.testAppendOptionsWithExistingContent (compression) REGRESSION 🔴🔴 0 / 1
o.a.c.cql3.CqlBuilderTest.testAppendOptionsWithMultipleOptions (compression) REGRESSION 🔴🔴 0 / 1
o.a.c.cql3.CqlBuilderTest.testAppendOptionsWithSingleOption (compression) REGRESSION 🔴🔴 0 / 1
o.a.c.cql3.CqlBuilderTest.testAppendOptionsWithSpecialCharacters (compression) REGRESSION 🔴🔴 0 / 1
o.a.c.cql3.CqlBuilderTest.testOptionsBuilderWithMixedEmptyAndNonEmpty (compression) REGRESSION 🔴🔴 0 / 1

Found 13 known test failures

@driftx driftx merged commit 7229953 into main-5.0 Aug 28, 2025
578 of 592 checks passed
@driftx driftx deleted the CNDB-15039 branch August 28, 2025 13:58
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