michaeljmarshall commented on code in PR #4353:
URL: https://github.com/apache/cassandra/pull/4353#discussion_r2674018371


##########
src/java/org/apache/cassandra/index/sai/plan/StorageAttachedIndexQueryPlan.java:
##########
@@ -150,7 +150,7 @@ public Function<PartitionIterator, PartitionIterator> 
postProcessor(ReadCommand
             return partitions -> partitions;
 
         // in case of top-k query, filter out rows that are not actually 
global top-K
-        return partitions -> (PartitionIterator) new 
VectorTopKProcessor(command).filter(partitions);
+        return partitions -> (PartitionIterator) new 
VectorTopKProcessor(command).consumeSortByScoreAndTakeTopK(partitions);

Review Comment:
   Correct, the a peer will not observe this change



##########
src/java/org/apache/cassandra/index/sai/plan/StorageAttachedIndexQueryPlan.java:
##########
@@ -150,7 +150,7 @@ public Function<PartitionIterator, PartitionIterator> 
postProcessor(ReadCommand
             return partitions -> partitions;
 
         // in case of top-k query, filter out rows that are not actually 
global top-K
-        return partitions -> (PartitionIterator) new 
VectorTopKProcessor(command).filter(partitions);
+        return partitions -> (PartitionIterator) new 
VectorTopKProcessor(command).consumeSortByScoreAndTakeTopK(partitions);

Review Comment:
   Correct, the a peer will not observe any change in behavior



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