Better multi-column aggregation support with StringView#11684
Closed
XiangpengHao wants to merge 2 commits intoapache:string-view2from
Closed
Better multi-column aggregation support with StringView#11684XiangpengHao wants to merge 2 commits intoapache:string-view2from
XiangpengHao wants to merge 2 commits intoapache:string-view2from
Conversation
Contributor
Author
|
Update here that the new implementation does not need to hash twice, so it should not create noticeable performance regression on shorter strings. And the perf on longer strings are still much faster! |
Contributor
What is the new impl you referred to |
Contributor
Author
Sorry for the late reply! I meant the new commit I made to this PR. Since |
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.
Which issue does this PR close?
Related to #7000.
Rationale for this change
I get some time to implement the multi-column aggregation with StringView, the implementation is inspired by @jayzhan211 's #10976.
However, the performance is mixed, I see almost no performance diff with ClickBench query 18:
This is becuase the average size of
SearchPhraseis only 4, meaning the string is always inlined to view and thus not being reused.However, I made this query (q14, changed
SearchPhrasetoURL)Without this patch, it takes 7.4s; with this patch, it takes 5.9s, a 20% improvement.
With this patch, the output string will reuse the string values in the buffer, so it is good.
However, when
interning the values, we need to hash twice: (1) the string itself to buildBytesViewMap(2) the group index -u32, which adds overhead.What changes are included in this PR?
Things not implemented yet:
EmtiTo::First(n): I need to think a bit more about how to efficiently reuse theBytesViewBuilderAre these changes tested?
Are there any user-facing changes?
No