-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Fix boundRatio incorrect merge #60532
Fix boundRatio incorrect merge #60532
Conversation
Missing tests. Missing comments. Missing a changelog entry. |
Hi @alexey-milovidov , the problem is that when I can reproduce it in a 2-nodes cluster, -- this case mimic CI test 00715_bounding_ratio
--
-- in node 1, run below queries
create table rate_test on cluster my_cluster (timestamp UInt32, event UInt32) engine=Memory;
insert into rate_test values (0,1000),(1,1001),(2,1002),(3,1003),(4,1004),(5,1005),(6,1006),(7,1007),(8,1008);
create table rate_test_dist (timestamp UInt32, event UInt32) engine=Distributed(my_cluster, currentDatabase(), 'rate_test');
select boundingRatio(timestamp, event) from rate_test; -- output: 1
select boundingRatio(timestamp, event) from rate_test_dist; -- output: 126 but i don't know how to implement this in CI |
Probably, even more "interesting" output |
@wangtZJU, Write tests. Write comments. Write changelog entry. |
tests and changelog entry are added |
Thank you! |
This is an automated comment for commit c4062de with description of existing statuses. It's updated for the latest CI running ⏳ Click here to open a full report in a separate page
Successful checks
|
@@ -63,6 +63,9 @@ struct AggregateFunctionBoundingRatioData | |||
{ | |||
*this = other; | |||
} | |||
else if (other.empty) | |||
{ |
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.
It still lacks comments.
|
||
create table rate_test (timestamp UInt32, event UInt32) engine=Memory; | ||
insert into rate_test values (0,1000),(1,1001),(2,1002),(3,1003),(4,1004),(5,1005),(6,1006),(7,1007),(8,1008); | ||
|
||
select 1.0 = boundingRatio(timestamp, event) from rate_test; | ||
|
||
create table rate_test2 (timestamp UInt32, event UInt32) engine=Memory; |
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.
It should be added as a new test. The old test should remain untouched.
But we also need comments in the code. |
@alexey-milovidov fixed |
c6ee594
to
c4062de
Compare
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix boundRatio incorrect merge
Documentation entry for user-facing changes