-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Minor: Improve aggregate test coverage more #6952
Conversation
statement ok | ||
CREATE TABLE empty (column1 bigint, column2 int); | ||
|
||
# no group by column |
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.
The null tests didn't originally have coverage for the no group by case so I added that and consolidated some tests
(33, 11, null, 'B'), | ||
(9, 12, null, 'A'); | ||
|
||
# query_bit_and, query_bit_or, query_bit_xor |
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.
These also didn't have coverage for GROUP BY , so I consolidated the tests and added grouping coverage
SELECT | ||
c1, | ||
SUM(c2) FILTER (WHERE c2 >= 20), | ||
SUM(c2) FILTER (WHERE c2 < 1) -- no rows pass filter, so the output should be NULL |
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.
added some additional coverage with filtering
|
||
# query_group_by_with_multiple_filters | ||
query IIR rowsort | ||
SELECT c1, SUM(c2) FILTER (WHERE c2 >= 20) AS sum_c2, AVG(c3) FILTER (WHERE c3 <= 70) AS avg_c3 FROM test_table GROUP BY c1 |
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.
this was just some whitespace OCD
And this found a bug #6955 🎉 |
94e8212
to
5f01044
Compare
I think this is important coverage to add so I am merging it in |
Which issue does this PR close?
Follow on to #6939
Related to #6889
Rationale for this change
I almost merged code that had incorrect aggregate null handling and the tests didn't catch it
This is my attempt to improve coverage
What changes are included in this PR?
Add some more tests of aggregates (several types were missing coverage with
GROUP BY
). I'll comment inlineAre these changes tested?
Are there any user-facing changes?