[Improvement](dict) compute hash only if needed#18058
Merged
Gabriel39 merged 1 commit intoapache:masterfrom Mar 24, 2023
Merged
[Improvement](dict) compute hash only if needed#18058Gabriel39 merged 1 commit intoapache:masterfrom
Gabriel39 merged 1 commit intoapache:masterfrom
Conversation
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
| } | ||
|
|
||
| uint32_t get_hash_value(uint32_t idx) const { return _dict.get_hash_value(_codes[idx]); } | ||
| uint32_t get_hash_value(uint32_t idx) { return _dict.get_hash_value(_codes[idx], _type); } |
Contributor
There was a problem hiding this comment.
warning: 'this' argument to member function 'get_hash_value' has type 'const doris::vectorized::ColumnDictionary::Dictionary', but function is not marked const [clang-diagnostic-error]
uint32_t get_hash_value(uint32_t idx) const { return _dict.get_hash_value(_codes[idx], _type); }
^be/src/vec/columns/column_dictionary.h:533: in instantiation of member function 'doris::vectorized::ColumnDictionary::get_hash_value' requested here
template class ColumnDictionary<int32_t>;
^be/src/vec/columns/column_dictionary.h:373: 'get_hash_value' declared here
inline uint32_t get_hash_value(T code, FieldType type) {
^
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
Contributor
Author
|
run buildall |
fb3c763 to
ab133e9
Compare
Contributor
Author
|
run buildall |
1 similar comment
Contributor
Author
|
run buildall |
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
|
PR approved by at least one committer and no changes requested. |
Gabriel39
added a commit
to Gabriel39/incubator-doris
that referenced
this pull request
Mar 24, 2023
5 tasks
morningman
pushed a commit
that referenced
this pull request
Mar 24, 2023
gnehil
pushed a commit
to gnehil/doris
that referenced
this pull request
Apr 21, 2023
mongo360
pushed a commit
to mongo360/doris
that referenced
this pull request
Jul 12, 2023
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.
Proposed changes
Hash values in dict column are always computed each time. Since those values are only needed by bloom filter predicate, this PR make it be computed only if it is needed.
Problem summary
Describe your changes.
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...