suneet-s opened a new pull request #10316: URL: https://github.com/apache/druid/pull/10316
### Description InDimFilter can operate on a large set of values. Computing the hashCode for this large set of values can be expensive. Instead of this, Druid can use the number of values in the filter to compute the hashCode. This should speed up the computation with the side-effect of higher collisions. The equals method will still check every value in the list, so 2 filters operating on the same dimension with the same filter shape and values, will not be considered equal. <img width="1672" alt="Screen Shot 2020-08-24 at 8 29 54 AM" src="https://user-images.githubusercontent.com/44787917/91064397-0b1d5f80-e5e4-11ea-85c1-2c312db579a4.png"> This flamegraph shows a query that spends ~10% of it's time calculating the hashCode for the InDimFilter which has a large number of values <hr> This PR has: - [ ] been self-reviewed. - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.) - [ ] added documentation for new or modified features or behaviors. - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links. - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/licenses.yaml) - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader. - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met. - [ ] added integration tests. - [ ] been tested in a test Druid cluster. ---------------------------------------------------------------- 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]
