arvindksi274-ksolves commented on PR #4412: URL: https://github.com/apache/cassandra/pull/4412#issuecomment-3389450618
Hi team! This PR has been open for 4 days and I'd appreciate some feedback on my fix for **CASSANDRA-20154**. **Quick Summary:** - Fixes BETWEEN operator to handle inverted bounds correctly per SQL standards - `WHERE pk BETWEEN 5 AND 3` now returns empty results (was incorrectly returning rows) - Changes in `SimpleRestriction.java` and `ClusteringColumnRestrictions.java` - Added comprehensive tests to verify the fix **Technical Details:** The core issue was Cassandra automatically sorting BETWEEN bounds, causing inverted bounds like `BETWEEN 5 AND 3` to return rows instead of empty results. This PR preserves user-specified bound order to match SQL standard behavior. **Testing:** - Added tests for inverted BETWEEN bounds - Verified existing functionality remains intact - Covers both partition key and clustering column scenarios Would really appreciate review from the community! Particularly looking for feedback on: 1. Any edge cases I might have missed 2. Performance implications 3. Additional test scenarios to consider @dineshjoshi @maedhroz @smiklosovic @jmckenzie-dev @ifesdjeen - would any of you have time to take a look when convenient? Thanks for your time! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

