mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Update ASTSelectWithUnionQuery.cpp
This commit is contained in:
parent
8da7f406af
commit
0950584f88
@ -33,9 +33,9 @@ void ASTSelectWithUnionQuery::formatQueryImpl(const FormatSettings & settings, F
|
|||||||
auto mode_to_str = [&](auto mode)
|
auto mode_to_str = [&](auto mode)
|
||||||
{
|
{
|
||||||
if (mode == Mode::ALL)
|
if (mode == Mode::ALL)
|
||||||
return " ALL";
|
return "UNION ALL";
|
||||||
else if (mode == Mode::DISTINCT)
|
else if (mode == Mode::DISTINCT)
|
||||||
return " DISTINCT";
|
return "UNION DISTINCT";
|
||||||
else if (mode == Mode::INTERSECT)
|
else if (mode == Mode::INTERSECT)
|
||||||
return "INTERSECT";
|
return "INTERSECT";
|
||||||
else if (mode == Mode::EXCEPT)
|
else if (mode == Mode::EXCEPT)
|
||||||
@ -46,7 +46,7 @@ void ASTSelectWithUnionQuery::formatQueryImpl(const FormatSettings & settings, F
|
|||||||
for (ASTs::const_iterator it = list_of_selects->children.begin(); it != list_of_selects->children.end(); ++it)
|
for (ASTs::const_iterator it = list_of_selects->children.begin(); it != list_of_selects->children.end(); ++it)
|
||||||
{
|
{
|
||||||
if (it != list_of_selects->children.begin())
|
if (it != list_of_selects->children.begin())
|
||||||
settings.ostr << settings.nl_or_ws << indent_str << (settings.hilite ? hilite_keyword : "") << "UNION"
|
settings.ostr << settings.nl_or_ws << indent_str << (settings.hilite ? hilite_keyword : "")
|
||||||
<< mode_to_str((is_normalized) ? union_mode : list_of_modes[it - list_of_selects->children.begin() - 1])
|
<< mode_to_str((is_normalized) ? union_mode : list_of_modes[it - list_of_selects->children.begin() - 1])
|
||||||
<< (settings.hilite ? hilite_none : "");
|
<< (settings.hilite ? hilite_none : "");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user