mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-20 05:05:38 +00:00
Fix inconsistent formatting for GRANT CURRENT GRANTS
This commit is contained in:
parent
183a3521de
commit
c50ef37a03
@ -97,24 +97,9 @@ namespace
|
|||||||
|
|
||||||
void formatCurrentGrantsElements(const AccessRightsElements & elements, const IAST::FormatSettings & settings)
|
void formatCurrentGrantsElements(const AccessRightsElements & elements, const IAST::FormatSettings & settings)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i != elements.size(); ++i)
|
settings.ostr << "(";
|
||||||
{
|
formatElementsWithoutOptions(elements, settings);
|
||||||
const auto & element = elements[i];
|
settings.ostr << ")";
|
||||||
|
|
||||||
bool next_element_on_same_db_and_table = false;
|
|
||||||
if (i != elements.size() - 1)
|
|
||||||
{
|
|
||||||
const auto & next_element = elements[i + 1];
|
|
||||||
if (element.sameDatabaseAndTableAndParameter(next_element))
|
|
||||||
next_element_on_same_db_and_table = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!next_element_on_same_db_and_table)
|
|
||||||
{
|
|
||||||
settings.ostr << " ";
|
|
||||||
formatONClause(element, settings);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user