From a8c8466ffb76be8669cdbcb0f25a09e8647cfa70 Mon Sep 17 00:00:00 2001 From: Vxider Date: Fri, 20 Mar 2020 12:48:20 +0800 Subject: [PATCH] fix clang build --- dbms/src/Interpreters/InterpreterInsertQuery.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dbms/src/Interpreters/InterpreterInsertQuery.cpp b/dbms/src/Interpreters/InterpreterInsertQuery.cpp index 8f2cbb4b65d..ab3b64840a0 100644 --- a/dbms/src/Interpreters/InterpreterInsertQuery.cpp +++ b/dbms/src/Interpreters/InterpreterInsertQuery.cpp @@ -37,6 +37,7 @@ namespace ErrorCodes extern const int NO_SUCH_COLUMN_IN_TABLE; extern const int ILLEGAL_COLUMN; extern const int DUPLICATE_COLUMN; + extern const int LOGICAL_ERROR; } @@ -123,7 +124,7 @@ BlockIO InterpreterInsertQuery::execute() // Distributed INSERT SELECT std::shared_ptr storage_src; auto & select_ = query.select->as(); - auto new_query = dynamic_pointer_cast(query.clone()); + auto new_query = std::dynamic_pointer_cast(query.clone()); if (select_.list_of_selects->children.size() == 1) { auto & select_query = select_.list_of_selects->children.at(0)->as(); @@ -131,13 +132,13 @@ BlockIO InterpreterInsertQuery::execute() if (joined_tables.tablesCount() == 1) { - storage_src = dynamic_pointer_cast(joined_tables.getLeftTableStorage()); + storage_src = std::dynamic_pointer_cast(joined_tables.getLeftTableStorage()); if (storage_src) { const auto select_with_union_query = std::make_shared(); select_with_union_query->list_of_selects = std::make_shared(); - auto new_select_query = dynamic_pointer_cast(select_query.clone()); + auto new_select_query = std::dynamic_pointer_cast(select_query.clone()); select_with_union_query->list_of_selects->children.push_back(new_select_query); new_select_query->replaceDatabaseAndTable(storage_src->getRemoteDatabaseName(), storage_src->getRemoteTableName()); @@ -147,7 +148,7 @@ BlockIO InterpreterInsertQuery::execute() } } - auto storage_dst = dynamic_pointer_cast(table); + auto storage_dst = std::dynamic_pointer_cast(table); if (storage_src && storage_dst && storage_src->cluster_name == storage_dst->cluster_name) {