You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/08/25 06:05:47 UTC
[GitHub] [druid] gianm commented on a change in pull request #10316: Optimize InDimFilter hashCode calculation
gianm commented on a change in pull request #10316:
URL: https://github.com/apache/druid/pull/10316#discussion_r476197783
##########
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:
Maybe use the size and the first few values?
It's easy to imagine situations where the extra collisions from only checking size are a problem, and it's tough to imagine situations where the perf impact of adding[the first few values is going to be big. So it seems like a good idea.
Please also include a comment about the rationale for the nonstandard hashCode impl. It'd be good to link to this PR.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org