mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
Fixed formatting of expressions like (x[1].1)[1]
This commit is contained in:
parent
0bc2b751ea
commit
2c0bdf1d90
@ -223,10 +223,16 @@ void ASTFunction::formatImplWithoutAlias(const FormatSettings & settings, Format
|
||||
{
|
||||
if (lit->value.getType() == Field::Types::UInt64)
|
||||
{
|
||||
if (frame.need_parens)
|
||||
settings.ostr << '(';
|
||||
|
||||
arguments->children[0]->formatImpl(settings, state, nested_need_parens);
|
||||
settings.ostr << (settings.hilite ? hilite_operator : "") << "." << (settings.hilite ? hilite_none : "");
|
||||
arguments->children[1]->formatImpl(settings, state, nested_need_parens);
|
||||
written = true;
|
||||
|
||||
if (frame.need_parens)
|
||||
settings.ostr << ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user