abhishekagarwal87 commented on a change in pull request #10316:
URL: https://github.com/apache/druid/pull/10316#discussion_r476398225



##########
File path: 
processing/src/main/java/org/apache/druid/query/filter/InDimFilter.java
##########
@@ -382,7 +386,7 @@ public boolean equals(Object o)
   @Override
   public int hashCode()
   {
-    return Objects.hash(values, dimension, extractionFn, filterTuning);
+    return Objects.hash(values.size(), dimension, extractionFn, filterTuning);

Review comment:
       It's interesting though that `values` itself is a HashSet being passed 
to InDimFilter which would mean hash code is evaluated for all the elements in 
the set. But that penalty for constructing `values` doesn't show up in the 
graph. is the full flame graph available to look further? 
   I can see in one place where multiple `InDimFilter` are created with the 
same `values`.  Maybe that's the part responsible for perf penalty. If there is 
a `Set` type that remembers its hashCode, using such type for `values` could be 
more beneficial. 




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