maedhroz commented on code in PR #3645:
URL: https://github.com/apache/cassandra/pull/3645#discussion_r1825194221
##########
test/unit/org/apache/cassandra/index/sai/cql/AllowFilteringTest.java:
##########
@@ -296,6 +296,24 @@ public void
testAllowFilteringOnClusteringAndRegularColumns() throws Throwable
test("SELECT * FROM %s WHERE v1=0 AND v2=0 AND k1=0 AND k2=0 AND (c1,
c2, c3, c4) = (0, 0, 0, 0) AND v3=0", true);
}
+ @Test
+ public void testAllowFilteringWithINClause () throws Throwable
+ {
+ createTable("CREATE TABLE %S (K1 TEXT, K2 TEXT, K3 TEXT, PRIMARY
KEY(K1))");
+ createIndex(format("CREATE CUSTOM INDEX ON %%s(K2) USING '%s'",
StorageAttachedIndex.class.getName()));
+
+ execute("INSERT INTO %s (K1,K2,K3) VALUES ('s1','s11','s111')");
+ execute("INSERT INTO %s (K1,K2,K3) VALUES ('s2','s11','s11')");
+ execute("INSERT INTO %s (K1,K2,K3) VALUES ('s3','s22','s111')");
+ execute("INSERT INTO %s (K1,K2,K3) VALUES ('s4','s22','s111')");
+ execute("INSERT INTO %s (K1,K2,K3) VALUES ('s5','s31','s111')");
+
+ testCount("SELECT * FROM %s WHERE K2='s11' AND K3 IN ('s11','s111')",
true, 2);
+ testCount("SELECT * FROM %s WHERE K2='s22' AND K3 IN ('s111','s111')",
true, 2);
+ testCount("SELECT * FROM %s WHERE K2='s31' AND K3 ='s111' ALLOW
FILTERING", false, 1);
Review Comment:
Might also be good to have a query that returns no results...
--
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]