maedhroz commented on code in PR #3645:
URL: https://github.com/apache/cassandra/pull/3645#discussion_r1829791069


##########
test/unit/org/apache/cassandra/index/sai/cql/AllowFilteringTest.java:
##########
@@ -296,6 +296,79 @@ 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 testAllowFilteringTextWithINClause () 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')");
+
+        assertRowCount(execute("SELECT * FROM %s WHERE K2='s11' AND K3 IN 
('s11','s111') ALLOW FILTERING"),2);
+        assertRowCount(execute("SELECT * FROM %s WHERE K2='s22' AND K3 IN 
('s111','s111') ALLOW FILTERING"), 2);
+
+    }
+
+    @Test
+    public void testAllowFilteringIntWithINClause () throws Throwable
+    {
+        createTable("CREATE TABLE %S (K1 text, K2 int, K3 int, PRIMARY 
KEY(K1))");

Review Comment:
   nit: Not super important, but in all these new tests, let's settle on a 
consistent lower-casing of the column names? (ex. `k1`, `k2`, `k3`, etc.)



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