Make ASTFuzzer happy

This commit is contained in:
Yatsishin Ilya 2023-07-17 11:32:22 +00:00
parent 96912b12bc
commit 5b853c1958
2 changed files with 8 additions and 4 deletions

View File

@ -56,8 +56,7 @@ void ASTCreateIndexQuery::formatQueryImpl(const FormatSettings & settings, Forma
formatOnCluster(settings);
if (!cluster.empty())
settings.ostr << " ";
settings.ostr << " ";
index_decl->formatImpl(settings, state, frame);
}

View File

@ -29,9 +29,14 @@ void ASTIndexDeclaration::formatImpl(const FormatSettings & s, FormatState & sta
{
if (part_of_create_index_query)
{
s.ostr << "(";
if (expr->as<ASTExpressionList>())
{
s.ostr << "(";
expr->formatImpl(s, state, frame);
s.ostr << ")";
}
else
expr->formatImpl(s, state, frame);
s.ostr << ")";
}
else
{