Apply suggestions from code review

This commit is contained in:
Vladimir C 2021-11-10 14:44:35 +03:00 committed by GitHub
parent 3b82c36049
commit 19e2cbcabc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -191,7 +191,7 @@ private:
ASTTableJoin * table_join = node.table_join->as<ASTTableJoin>();
if (table_join->locality != ASTTableJoin::Locality::Global)
{
if (auto table = node.table_expression->as<ASTTableExpression>())
if (auto * table = node.table_expression->as<ASTTableExpression>())
{
if (auto & subquery = table->subquery)
{
@ -207,7 +207,7 @@ private:
std::vector<ASTPtr> renamed;
NonGlobalTableVisitor::Data table_data{data.getContext(), data.checker, renamed, nullptr, table_join};
NonGlobalTableVisitor(table_data).visit(tb);
if (!renamed.empty())
if (!renamed.empty()) //-V547
data.renamed_tables.emplace_back(tb, std::move(renamed));
}
}

View File

@ -1,3 +1,4 @@
-- Tags: global, no-parallel
CREATE DATABASE IF NOT EXISTS test_02115;
USE test_02115;
@ -29,4 +30,4 @@ DROP TABLE t1_local;
DROP TABLE t2_local;
DROP TABLE t1_all;
DROP TABLE t2_all;
DROP DATABASE test_02115;
DROP DATABASE test_02115;