clintropolis commented on code in PR #17565:
URL: https://github.com/apache/druid/pull/17565#discussion_r1883700723


##########
processing/src/main/java/org/apache/druid/query/topn/TopNQueryEngine.java:
##########
@@ -275,7 +275,7 @@ private static boolean canUsePooledAlgorithm(
       final int numBytesToWorkWith = resultsBuf.capacity();
       final int numValuesPerPass = numBytesPerRecord > 0 ? numBytesToWorkWith 
/ numBytesPerRecord : cardinality;
 
-      return numValuesPerPass <= cardinality;
+      return numValuesPerPass >= cardinality;

Review Comment:
   yea this is fair, it is not really a problem in practice because currently 
the column capabilities should not report as dictionary encoded if the 
cardinality is -1, so we return false earlier in the method before we get here, 
but this seems worth explicitly checking for just in case.



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