mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Do not prepend whitespace in grouping sets
This commit is contained in:
parent
fb5766287c
commit
5128afb0b7
@ -66,10 +66,7 @@ void ASTExpressionList::formatImplMultiline(const FormatSettings & settings, For
|
||||
frame_nested.surround_each_list_element_with_parens = false;
|
||||
|
||||
if (frame.surround_each_list_element_with_parens)
|
||||
{
|
||||
settings.ostr << "(";
|
||||
frame_nested.expression_list_prepend_whitespace = false;
|
||||
}
|
||||
|
||||
(*it)->formatImpl(settings, state, frame_nested);
|
||||
|
||||
|
@ -114,6 +114,7 @@ void ASTSelectQuery::formatImpl(const FormatSettings & s, FormatState & state, F
|
||||
{
|
||||
auto nested_frame = frame;
|
||||
nested_frame.surround_each_list_element_with_parens = true;
|
||||
nested_frame.expression_list_prepend_whitespace = false;
|
||||
nested_frame.indent++;
|
||||
s.ostr << (s.hilite ? hilite_keyword : "") << s.nl_or_ws << indent_str << (s.one_line ? "" : " ") << "GROUPING SETS" << (s.hilite ? hilite_none : "");
|
||||
s.ostr << " (";
|
||||
|
Loading…
Reference in New Issue
Block a user