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


##########
src/java/org/apache/cassandra/index/sai/plan/StorageAttachedIndexSearcher.java:
##########
@@ -380,6 +380,13 @@ private UnfilteredRowIterator 
queryStorageAndFilter(PrimaryKey key)
         private static UnfilteredRowIterator 
applyIndexFilter(UnfilteredRowIterator partition, FilterTree tree, QueryContext 
queryContext)
         {
             Row staticRow = partition.staticRow();
+
+            // We want to short-circuit the filtering of the whole partition 
if the static row
+            // satisfies the filter. If that is the case we just need to 
return the whole partition.
+            queryContext.rowsFiltered++;
+            if (tree.isSatisfiedBy(partition.partitionKey(), staticRow, 
staticRow))
+                return partition;
+

Review Comment:
   We can also remove the block below on L403 now, unless I'm missing 
something. If the `isSatisfiedBy()` check here fails, it won't suddenly pass 
later, right?



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