adelapena commented on PR #2556:
URL: https://github.com/apache/cassandra/pull/2556#issuecomment-1794845824
I have noticed that this test returns more rows than expected:
```java
@Test
public void notInTest()
{
createTable("CREATE TABLE %s (k int PRIMARY KEY, v1 int, v2 int)");
createIndex("CREATE INDEX ON %s(v1) USING 'sai'");
createIndex("CREATE INDEX ON %s(v2) USING 'sai'");
execute("INSERT INTO %s (k, v1, v2) VALUES (1, 1, 4)");
execute("INSERT INTO %s (k, v1, v2) VALUES (2, 2, 3)");
execute("INSERT INTO %s (k, v1, v2) VALUES (3, 3, 2)");
execute("INSERT INTO %s (k, v1, v2) VALUES (4, 4, 1)");
waitForTableIndexesQueryable(currentTable());
assertRowsIgnoringOrder(execute("SELECT * FROM %s"),
row(1, 1, 4),
row(2, 2, 3),
row(3, 3, 2),
row(4, 4, 1));
assertRowsIgnoringOrder(execute("SELECT * FROM %s WHERE v1 NOT IN (1)"),
row(2, 2, 3),
row(3, 3, 2),
row(4, 4, 1));
assertRowsIgnoringOrder(execute("SELECT * FROM %s WHERE v1 NOT IN (4)"),
row(1, 1, 4),
row(2, 2, 3),
row(3, 3, 2));
assertRowsIgnoringOrder(execute("SELECT * FROM %s WHERE v1 NOT IN (1,
4)"),
row(2, 2, 3),
row(3, 3, 2)); // Got 1 extra row(s) in result: (k=1, v1=1, v2=4)
assertRowsIgnoringOrder(execute("SELECT * FROM %s WHERE v1 NOT IN (1, 4)
AND v2 NOT IN (3, 2)")); // 2 extra rows
}
```
However, the test passes if we don't create the indexes and use `ALLOW
FILTERING` instead.
--
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]