Merged
Conversation
…ter grouping sets
2. Update formatAST to support grouping sets query with distributed table 3. modify astExpression to support function in grouping sets
Comment on lines
+29
to
+37
| if (frame.surround_each_list_element_with_parens) | ||
| settings.ostr << "("; | ||
|
|
||
| FormatStateStacked frame_nested = frame; | ||
| frame_nested.surround_each_list_element_with_parens = false; | ||
| (*it)->formatImpl(settings, state, frame_nested); | ||
|
|
||
| if (frame.surround_each_list_element_with_parens) | ||
| settings.ostr << ")"; |
Member
There was a problem hiding this comment.
For some reason, I have an extra space while formatting in client:
ELECT
SUM(number) AS sum_value,
count() AS count_value
FROM numbers_mt(1000000)
GROUP BY
GROUPING SETS (
( number % 10),
^ here
( number % 100))
^ here
ORDER BY
sum_value ASC,
count_value ASC
Member
|
Compare result for and The key (0, 0) was squashed. |
Member
KochetovNicolai
left a comment
There was a problem hiding this comment.
Generally everything is ok.
Except it would be good to fix key squashing for the distributed case :)
And fix execution of the query with only one grouping set
Member
Author
|
@Mergifyio update |
Contributor
✅ Branch has been successfully updated |
KochetovNicolai
approved these changes
May 11, 2022
Member
|
ok, failed tests does not seem to be relevant to the PR, merging. |
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
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Add support of GROUPING SETS in GROUP BY clause. Follow up after #33186. This implementation supports a parallel processing of grouping sets.