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


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/readers/BaseImmutableDictionary.java:
##########
@@ -279,4 +281,39 @@ protected byte[] getBytes(int dictId) {
   protected byte[] getBuffer() {
     return new byte[_numBytesPerValue];
   }
+
+  public void getDictIds(List<String> values, IntSet dictIds, int 
inPredicateSparseThreshold,
+      int inPredicateSortThreshold) {
+    if (length() / values.size() > inPredicateSparseThreshold || values.size() 
< inPredicateSortThreshold) {
+      for (String value : values) {

Review Comment:
   Agreed. We should definitely benchmark this. One more thing to consider is 
about the random lookup vs sequential read for in-memory or on-disk data access.
   
   Considering the Constant of each operation, it's hard to tell which one will 
be fast given our current numbers, e.g. N>1000, M > 100k.
   
   Then we need to compare: O(N) * O(1 of sequential read) * lg(M) * O(1 of 
random read) vs (O(N) + O(M)) * O(1 of sequential read)
   
   It's a bit hard to test until we run it on a large scale data set.
   



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