-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Aggregator support prefetch #9679
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
/retest |
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
This reverts commit 3e30f95.
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
20d56e4
to
e0dea79
Compare
dbms/src/Common/ColumnsHashing.h
Outdated
private: | ||
ALWAYS_INLINE inline StringRef getKey(size_t row) const | ||
{ | ||
auto last_offset = row == 0 ? 0 : offsets[row - 1]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just use auto last_offset = offsets[row - 1]
is ok
Signed-off-by: guo-shaoge <[email protected]>
e9c41c5
to
143fee3
Compare
Signed-off-by: guo-shaoge <[email protected]>
/retest |
@@ -851,6 +854,11 @@ class HashTable | |||
|
|||
iterator end() { return iterator(this, buf ? buf + grower.bufSize() : buf); } | |||
|
|||
void ALWAYS_INLINE prefetch(size_t hashval) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
void ALWAYS_INLINE prefetch(size_t hashval) const | |
void ALWAYS_INLINE prefetchRead(size_t hashval) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think prefetch
is simple and clear
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
8294bf5
to
e33075a
Compare
Signed-off-by: guo-shaoge <[email protected]>
e33075a
to
dc0973a
Compare
@@ -39,6 +39,7 @@ extern const char exception_before_mpp_root_task_run[]; | |||
extern const char exception_during_mpp_non_root_task_run[]; | |||
extern const char exception_during_mpp_root_task_run[]; | |||
extern const char exception_during_query_run[]; | |||
extern const char force_agg_prefetch[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: why force_agg_prefetch in ComputeServerRunner.testErrorMessage
will hang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from @windtalker : setCancelTest()
will make table scan output infinite output data, so this case will run forever if this case doesn't report error
…sertResultInto Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
7deb4b4
to
0ef6ba6
Compare
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
15c5305
to
b4a1bde
Compare
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
template <bool collect_hit_rate, bool only_lookup, typename Method> | ||
ALWAYS_INLINE void Aggregator::executeImplBatch( | ||
template <typename Method> | ||
ALWAYS_INLINE inline size_t getCurrentHashAndSetUpPrefetchHash( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ALWAYS_INLINE inline size_t getCurrentHashAndSetUpPrefetchHash( | |
ALWAYS_INLINE inline size_t getCurrentRowHashAndDoPrefetch( |
What problem does this PR solve?
Issue Number: close #9680
Problem Summary:
What is changed and how it works?
key32/key64/key128/key256
, and it doesn't affectkey_string/key_serialized
Benchmark
Workloads:
TPCH-50G
Queries:
ENV:
Results (google excel):
NOTE:
SELECT COUNT(DISTINCT UserID) FROM hits;
https://github.com/ClickHouse/ClickBench/blob/main/mysql/queries.sqlCheck List
Tests
Side effects
Documentation
Release note