diff --git a/src/Parsers/ASTColumnsTransformers.cpp b/src/Parsers/ASTColumnsTransformers.cpp index b28644383d1..7af9786bfdb 100644 --- a/src/Parsers/ASTColumnsTransformers.cpp +++ b/src/Parsers/ASTColumnsTransformers.cpp @@ -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, diff --git a/src/Parsers/ExpressionElementParsers.cpp b/src/Parsers/ExpressionElementParsers.cpp index 0a0fca53545..47fc1423d3e 100644 --- a/src/Parsers/ExpressionElementParsers.cpp +++ b/src/Parsers/ExpressionElementParsers.cpp @@ -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(); res->func_name = getIdentifierName(func_name);