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


##########
src/java/org/apache/cassandra/index/sai/plan/StorageAttachedIndexSearcher.java:
##########
@@ -412,15 +433,15 @@ private UnfilteredRowIterator applyIndexFilter(PrimaryKey 
key, UnfilteredRowIter
             {
                 queryContext.rowsFiltered++;
 
-                if (tree.isSatisfiedBy(key.partitionKey(), staticRow, 
staticRow))
+                if (tree.isSatisfiedBy(partition.partitionKey(), staticRow, 
staticRow))
                     hasMatch = true;
             }
 
             if (!hasMatch)
             {
                 // shadowed by expired TTL or row tombstone or range tombstone
                 if (topK)
-                    queryContext.vectorContext().recordShadowedPrimaryKey(key);
+                    
queryContext.vectorContext().recordShadowedPrimaryKey(keys);

Review Comment:
   @jasonstack @mike-tr-adamson @jbellis @pkolaczk I want to say I've broken 
things by shadowing all of the keys here. It seems like what I'd actually want 
to do is move this to the first loop above (while) and call this key by key is 
`isSatisfiedBy()` fails? Otherwise, I think what I have here will miss 
recording when _any_ matches occur....



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