richardstartin commented on code in PR #10254:
URL: https://github.com/apache/pinot/pull/10254#discussion_r1101893322


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/predicate/PredicateUtils.java:
##########
@@ -139,10 +143,40 @@ public static IntSet getDictIdSet(BaseInPredicate 
inPredicate, Dictionary dictio
         }
         break;
       case STRING:
-        for (String value : values) {
-          int dictId = dictionary.indexOf(value);
-          if (dictId >= 0) {
-            dictIdSet.add(dictId);
+        if (values.size() > 
RequestContextUtils.THRESHOLD_OF_LARGE_IN_CLAUSE_VALUES) {

Review Comment:
   I think this should consider the ratio of the size to the dictionary 
cardinality. What if you have 1001 strings in the in clause but 100000 in the 
dictionary? Binary search is still going to win here. 



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