-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix null deference for GROUP BY WITH TOTALS HAVING (when the column from HAVING wasn't selected) #29553
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
Merged
alexey-milovidov
merged 2 commits into
ClickHouse:master
from
azat:group-by-with-totals-having-fix
Oct 4, 2021
Merged
Fix null deference for GROUP BY WITH TOTALS HAVING (when the column from HAVING wasn't selected) #29553
alexey-milovidov
merged 2 commits into
ClickHouse:master
from
azat:group-by-with-totals-having-fix
Oct 4, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rom HAVING wasn't selected) Found by UBsan fuzzer [1]. [1]: https://clickhouse-test-reports.s3.yandex.net/29503/a4f2663b8209e0e75021d8b84f932bc162c81857/fuzzer_ubsan/report.html#fail1
1bdc868 to
ce8c9be
Compare
GROUP BY WITH TOTALS HAVINGce8c9be to
032bb55
Compare
KochetovNicolai
approved these changes
Sep 30, 2021
azat
commented
Sep 30, 2021
| } | ||
|
|
||
| num_rows = columns.front()->size(); | ||
| num_rows = columns.empty() ? countBytesInFilter(*filter_description.data) : columns.front()->size(); |
Member
Author
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.
Egh, I submitted PR w/o real fix, anyway you fix looks better, thanks!
P.S. I was going to fix this by removing filter_column_name at the end.
This was referenced Oct 4, 2021
robot-clickhouse
pushed a commit
that referenced
this pull request
Oct 4, 2021
…HAVING (when the column from HAVING wasn't selected)
robot-clickhouse
pushed a commit
that referenced
this pull request
Oct 4, 2021
…HAVING (when the column from HAVING wasn't selected)
robot-clickhouse
pushed a commit
that referenced
this pull request
Oct 4, 2021
… HAVING (when the column from HAVING wasn't selected)
robot-clickhouse
pushed a commit
that referenced
this pull request
Oct 4, 2021
…HAVING (when the column from HAVING wasn't selected)
robot-clickhouse
pushed a commit
that referenced
this pull request
Oct 4, 2021
…HAVING (when the column from HAVING wasn't selected)
alexey-milovidov
added a commit
that referenced
this pull request
Oct 16, 2021
Backport #29553 to 21.10: Fix null deference for GROUP BY WITH TOTALS HAVING (when the column from HAVING wasn't selected)
KochetovNicolai
added a commit
that referenced
this pull request
Oct 20, 2021
Backport #29553 to 21.8: Fix null deference for GROUP BY WITH TOTALS HAVING (when the column from HAVING wasn't selected)
alexey-milovidov
added a commit
that referenced
this pull request
Oct 23, 2021
Backport #29553 to 21.9: Fix null deference for GROUP BY WITH TOTALS HAVING (when the column from HAVING wasn't selected)
alexey-milovidov
added a commit
that referenced
this pull request
Oct 23, 2021
Backport #29553 to 21.3: Fix null deference for GROUP BY WITH TOTALS HAVING (when the column from HAVING wasn't selected)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Found by UBsan fuzzer 1.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix null deference for
GROUP BY WITH TOTALS HAVING(when the column fromHAVINGwasn't selected)Detailed description / Documentation draft:
Fixes: #29475 (cc @KochetovNicolai )
Fixes: #29687
NOTE: marked as
Not for changelogsince original PR is not included into any release yetUPD: have to mark it as
Bug fixsince orignial PR was aBug fix