suneet-s commented on a change in pull request #10313:
URL: https://github.com/apache/druid/pull/10313#discussion_r476501925



##########
File path: 
processing/src/main/java/org/apache/druid/query/filter/InDimFilter.java
##########
@@ -80,7 +80,8 @@
 {
   // determined through benchmark that binary search on long[] is faster than 
HashSet until ~16 elements
   // Hashing threshold is not applied to String for now, String still uses 
ImmutableSortedSet
-  public static final int NUMERIC_HASHING_THRESHOLD = 16;
+  public static final int NUMERIC_HASHING_THRESHOLD =
+      
Integer.parseInt(System.getProperty("druid.query.filter.inDimFilter.numericHashingThreshold",
 "1"));

Review comment:
       ha I didn't look at the optimize code in the `InDimFilter` before.
   `SelectorDimFilter.optimize()` produces an `InDimFilter` and 
`InDimFilter.optimize()` produces a `SelectorDimFilter`. One of those must be 
wrong 😅 
   
   Either way, it probably doesn't make a difference with 1 element.
   
   I put the default in mainly because of my paranoia, just in case this causes 
a perf degradation for a specific shape of query that isn't covered by my 
benchmarks. I'll run them a few more times and then just drop this code path.




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

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