dcapwell commented on code in PR #4412:
URL: https://github.com/apache/cassandra/pull/4412#discussion_r2673724733


##########
src/java/org/apache/cassandra/cql3/restrictions/ClusteringColumnRestrictions.java:
##########
@@ -210,6 +216,17 @@ public void addToRowFilter(RowFilter filter,
 
     private boolean handleInFilter(SingleRestriction restriction, int index)
     {
-        return restriction.needsFilteringOrIndexing() || index != 
restriction.firstColumn().position();
+        // Allow BETWEEN on the first clustering column to be handled via row 
filter
+        if (restriction instanceof SimpleRestriction)
+        {
+            SimpleRestriction sr = (SimpleRestriction) restriction;
+            if (sr.operator() == Operator.BETWEEN &&
+                    index == sr.firstColumn().position())
+            {
+                return true;
+            }
+        }
+        // Default: require filtering or non‑leading‑column position
+        return restriction.needsFilteringOrIndexing() ||index != 
restriction.firstColumn().position();

Review Comment:
   can you fix the spacing?



-- 
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]

Reply via email to