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

@ -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,