build error and style error fix

This commit is contained in:
hexiaoting 2020-11-09 13:58:32 +08:00
parent 8ffce5e974
commit ad8eac4929
2 changed files with 6 additions and 6 deletions

View File

@ -43,7 +43,7 @@ void ASTColumnsApplyTransformer::formatImpl(const FormatSettings & settings, For
parameters->formatImpl(settings, state, frame);
if (!column_name_prefix.empty())
settings.ostr << ", '" << column_name_prefix << "')";
settings.ostr << ", '" << column_name_prefix << "')";
}
void ASTColumnsApplyTransformer::transform(ASTs & nodes) const
@ -214,12 +214,12 @@ void ASTColumnsReplaceTransformer::transform(ASTs & nodes) const
if (is_strict && !replace_map.empty())
{
String expected_columns = "";
for (auto it = replace_map.begin(); it != replace_map.end(); ++it)
String expected_columns;
for (auto & elem: replace_map)
{
if (expected_columns != "")
if (!expected_columns.empty())
expected_columns += ", ";
expected_columns += it->first;
expected_columns += elem.first;
}
throw Exception(
"Columns transformer REPLACE expects following column(s) : " + expected_columns,

View File

@ -1317,7 +1317,7 @@ bool ParserColumnsTransformers::parseImpl(Pos & pos, ASTPtr & node, Expected & e
if (pos->type != TokenType::ClosingRoundBracket)
return false;
++pos;
}
}
auto res = std::make_shared<ASTColumnsApplyTransformer>();
res->func_name = getIdentifierName(func_name);