Repository navigation
Conversation
|
Workflow [PR], commit [675b1041] |
c0f8d73 to
c70e910
Compare
|
Any comments on the implementation will be very much appreciated |
Yeah, I'm now fixing the rest two (I hope) bugs and then will write comments and ask the review the PR |
| @@ -310,8 +326,50 @@ class HashMethodBase | |||
| null_map = &checkAndGetColumn<ColumnNullable>(*column).getNullMapColumn(); | |||
| } | |||
|
|
|||
| template <typename T, typename = void> | |||
There was a problem hiding this comment.
I added many type_traitrs-like structs to check do template types have specific methods or not
|
@nickitat Hi, please, review the PR. I've written description and some comments |
|
6d972b6 to
6c3a380
Compare
251c527 to
1227095
Compare
| @@ -0,0 +1,9 @@ | |||
| -- aggregate functions are JIT-compiled after 3 queries | |||
There was a problem hiding this comment.
It's not after three times, it's after compile_aggregate_expressions times
| if constexpr (!std::is_same_v<KeyHolder, DB::SerializedKeyHolder> | ||
| && !std::is_same_v<KeyHolder, DB::ArenaKeyHolder> | ||
| && !std::is_same_v<KeyHolder, Int128> | ||
| && !std::is_same_v<KeyHolder, UInt128> | ||
| && !std::is_same_v<KeyHolder, Int256> | ||
| && !std::is_same_v<KeyHolder, UInt256>) { // TODO support all types |
There was a problem hiding this comment.
It looks like we would solve two problems (a lot of unsupported types and a lot of new, quite hacky code to compare key holders) by implementing the approach I suggested a long time ago, i.e., to store keys explicitly as std::vector<Field>, the same way we do it in the optimisation for FINAL:
There was a problem hiding this comment.
store keys explicitly as
std::vector<Field>, the same way we do it in the optimisation forFINAL
I would be great if I could get keys explicitly, but I don't know how to do it. I get key holder here: https://github.com/ClickHouse/ClickHouse/pull/78553/files#diff-c8b49fda2cd83ab0699159b9fe8664fd976cd8550c4f26feac1adc35a03a3546R319. How to receive std::vector<Field>? @nickitat
|
Dear @nickitat, this PR hasn't been updated for a while. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
|
@Dmitry909 Thank you for working on it. Are you planning to continue? If not, I can base my work on your commits and finish it, preserving your authorship. |
Last time we chatted, Dmitry planned to push new code next week. |
|
Hi @nihalzp. I asked @nickitat is this task very important for ClickHouse project or not. He said, that now there are not enough free developers to do it. I'm interested in the task, but I'm pretty tired of doing it. Now I made corrections, which Nikita told me about, seems that it is near completion. And I can work on it once a week maybe. Soooo, let's leave it assigned to me for now. |
b6ff736 to
74c3850
Compare
|
@thevar1able will continue with this PR (in a little time from now) - thanks. |
|
I've started reviewing the changeset, sorry for the delay. I'm still getting up to speed with the aggregation implementation details, and mostly testing behavior changes at the moment. Looking at your previous benchmark, I see that you previously measured that the changeset drastically improves this simple query: However I can not reproduce this on the last commit: https://pastila.nl/?013c63ca/ab733283bc863bccb22cbb80672371a3#V53qorClfpgP4vFqfRiS8A==GCM Would you like to continue working on the PR? It is okay if it is not convenient for you at the moment, I can take it over and continue for you. |
|
Dear @thevar1able, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
|
Closing in favor of #96630 |

Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
GROUP BY with ORDER BY and LIMIT performance optimization. Resolves #72610.
Details
Idea of optimization
See in #72610.
The implementation works as follows:
findOptimizationSublistIndexesis used to determine the applicability of optimizationemplaceImplOptimization. Before each insertion into the HT, it is checked whether this key can be ignored. This is done using a heap. Heap stores iterators in HT.compareKeyHoldersis used as a comparator.Not solved details:
How to improve: