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


##########
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:
   Also, take a look at galloping intersection here 
https://github.com/RoaringBitmap/RoaringBitmap/blob/fd54c0a100629bb578946e2a0bf8b62784878fa8/RoaringBitmap/src/main/java/org/roaringbitmap/Util.java#L1028



##########
pinot-common/src/main/java/org/apache/pinot/common/request/context/RequestContextUtils.java:
##########
@@ -297,12 +300,18 @@ public static FilterContext getFilter(FunctionContext 
filterFunction) {
         for (int i = 1; i < numOperands; i++) {
           values.add(getStringValue(operands.get(i)));
         }
+        if (numOperands > THRESHOLD_OF_LARGE_IN_CLAUSE_VALUES) {
+          Collections.sort(values);

Review Comment:
   Also, take a look at galloping intersection here 
https://github.com/RoaringBitmap/RoaringBitmap/blob/fd54c0a100629bb578946e2a0bf8b62784878fa8/RoaringBitmap/src/main/java/org/roaringbitmap/Util.java#L1028



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to