adelapena commented on code in PR #4768:
URL: https://github.com/apache/cassandra/pull/4768#discussion_r3138175533
##########
src/java/org/apache/cassandra/index/sai/plan/StorageAttachedIndexSearcher.java:
##########
@@ -539,10 +542,15 @@ private static List<Row>
filterPartition(UnfilteredRowIterator partition, Filter
if (tree.isSatisfiedBy(partitionKey, (Row) unfiltered,
staticRow))
{
- matches.add((Row) unfiltered);
+ matches.add(unfiltered);
hasMatch = true;
}
}
+ else if (matchTombstones && unfiltered.isRangeTombstoneMarker())
+ {
+ // Note that range tombstones to not constitute matches, and
will be discarded if no actual rows match.
Review Comment:
```suggestion
// Note that range tombstones do not constitute matches, and
will be discarded if no actual rows match.
```
##########
test/distributed/org/apache/cassandra/distributed/test/sai/ReplicaFilteringWithStaticsTest.java:
##########
@@ -158,6 +158,47 @@ public void
testMissingStaticRowWithNonStaticExpression(boolean sai)
assertRows(CLUSTER.coordinator(1).execute(select,
ConsistencyLevel.ALL), row(0, 1, 2, 6, 7));
}
+ @Test
+ public void testRangeTombstoneWithStaticSAI()
+ {
+ testRangeTombstoneWithStatic(true);
+ }
+
+ @Test
+ public void testRangeTombstoneWithStatic()
+ {
+ testRangeTombstoneWithStatic(false);
+ }
+
+ public void testRangeTombstoneWithStatic(boolean sai)
Review Comment:
```suggestion
private void testRangeTombstoneWithStatic(boolean sai)
```
--
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]