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


##########
test/unit/org/apache/cassandra/index/sai/cql/CompositePartitionKeyIndexTest.java:
##########
@@ -26,8 +26,42 @@
 import org.apache.cassandra.db.marshal.TimeType;
 import org.apache.cassandra.index.sai.SAITester;
 
+import static org.junit.Assert.assertEquals;
+
 public class CompositePartitionKeyIndexTest extends SAITester
 {
+    @Test
+    public void testIntersectionOnMixedPostingsOnDelete() throws Throwable
+    {
+        createTable("CREATE TABLE %s (pk0 boolean, pk1 uuid, ck0 date, ck1 
smallint, s0 timeuuid static, v0 bigint, v1 float, PRIMARY KEY ((pk0, pk1), 
ck0, ck1)) WITH CLUSTERING ORDER BY (ck0 DESC, ck1 ASC)");
+
+        createIndex("CREATE INDEX tbl_pk0 ON %s(pk0) USING 'sai'");
+        createIndex("CREATE INDEX tbl_ck0 ON %s(ck0) USING 'sai'");
+
+        execute("INSERT INTO %s (pk0, pk1, ck0, ck1, s0) VALUES (true, 
00000000-0000-4700-8d00-000000000000, '-3038243-10-30', -12906, 
00000000-0000-1900-aa00-000000000000)");        
+        execute("INSERT INTO %s (pk0, pk1, ck0, ck1, v0, v1) VALUES (false, 
00000000-0000-4f00-a200-000000000000, '-1225324-10-07', -3223, 
-7318794006633168842, 8.0350916E-32 + 6.127658E28)");
+        execute("DELETE FROM %s WHERE  pk0 = false AND  pk1 = 
00000000-0000-4f00-a200-000000000000 AND  ck0 = '-1111567-10-09' AND  ck1 = 
25967");
+        execute("DELETE s0 FROM %s WHERE  pk0 = false AND  pk1 = 
00000000-0000-4500-9200-000000000000");
+
+        beforeAndAfterFlush(() -> assertEquals(1, execute("SELECT * FROM %s 
WHERE pk0 = false AND ck0 = '-1225324-10-07'").size()));

Review Comment:
   TODO: Going to expand this to check the full row



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