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
Improve WindowTransform::updateAggregationState
by addBatchSinglePlace
#46321
Conversation
dc309a1
to
6019971
Compare
updateAggregationState
by addBatchSinglePlace
WindowTransform::updateAggregationState
by addBatchSinglePlace
c0dd92a
to
cbbdc96
Compare
Please add performance tests: https://clickhouse.com/docs/en/development/tests#performance-tests |
8f4fcda
to
b9c4a78
Compare
There is a failure in |
b9c4a78
to
be306d5
Compare
be306d5
to
3915093
Compare
@@ -131,6 +131,7 @@ class WindowTransform final : public IProcessor | |||
void advanceFrameEnd(); | |||
void advanceFrameEndRangeOffset(); | |||
|
|||
template<bool enable_batch_aggregate> |
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.
template<bool enable_batch_aggregate> | |
template <bool enable_batch_aggregate> |
@@ -1157,7 +1187,7 @@ void WindowTransform::appendChunk(Chunk & chunk) | |||
// the frame boundaries, but it would require some care not to | |||
// perform unnecessary work while we are still looking for the frame | |||
// start, so do it the simple way for now. | |||
updateAggregationState(); | |||
(this->*update_aggregate_state)(); |
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.
Maybe it will be the same performance with if
, because it will be predictable, but it will be cleaner.
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.
Let's resolve conflicts and merge.
Merged in #56120. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Use
addBatchSinglePlace
instead ofadd
in some cases to accelateWindowTransform::updateAggregationState
Test
Result
Documentation entry for user-facing changes