Optimization for expressions that hit a single long column.#6599
Merged
gianm merged 5 commits intoapache:masterfrom Nov 13, 2018
Merged
Optimization for expressions that hit a single long column.#6599gianm merged 5 commits intoapache:masterfrom
gianm merged 5 commits intoapache:masterfrom
Conversation
There was previously a single-long-input optimization that applied only to the time column. These have been combined together. Also adds type-specific value caching to ExprEval, which allowed simplifying the SingleLongInputCachingExpressionColumnValueSelector code.
leventov
reviewed
Nov 11, 2018
|
|
||
| public class LruEvalCache | ||
| { | ||
| private final Long2ObjectLinkedOpenHashMap<ExprEval> m = new Long2ObjectLinkedOpenHashMap<>(CACHE_SIZE); |
Member
There was a problem hiding this comment.
Maybe don't size it from the beginning and let it grow
Contributor
Author
There was a problem hiding this comment.
Sounds like a good idea. I changed it.
Contributor
Author
|
Thanks for the reviews. |
gianm
added a commit
to implydata/druid-public
that referenced
this pull request
Nov 16, 2018
) * Optimization for expressions that hit a single long column. There was previously a single-long-input optimization that applied only to the time column. These have been combined together. Also adds type-specific value caching to ExprEval, which allowed simplifying the SingleLongInputCachingExpressionColumnValueSelector code. * Add more benchmarks. * Don't use LRU cache for __time. * Simplify a bit. * Let the cache grow.
gianm
added a commit
to implydata/druid-public
that referenced
this pull request
Nov 16, 2018
) * Optimization for expressions that hit a single long column. There was previously a single-long-input optimization that applied only to the time column. These have been combined together. Also adds type-specific value caching to ExprEval, which allowed simplifying the SingleLongInputCachingExpressionColumnValueSelector code. * Add more benchmarks. * Don't use LRU cache for __time. * Simplify a bit. * Let the cache grow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds an LRU cache for expression selectors on top of
a single long column.
There was previously a single-long-input optimization that applied only
to the time column. These have been combined together. Also adds
type-specific value caching to ExprEval, which allowed simplifying
the SingleLongInputCachingExpressionColumnValueSelector code.
Benchmarks (the ones we'd expect to see improvement on are arithmeticOnLong and stringConcatAndCompareOnLong):