Revert "Revert "dbms: fix column names asynchrony in SELECT from StorageDistributed. [#METR-13399]""

This reverts commit 08c41d2abb2e08922c567856ec37038d1fa59e72.
This commit is contained in:
Alexey Milovidov 2014-11-26 00:11:11 +03:00
parent a03bc39fa2
commit bdb666efee

View File

@ -21,9 +21,9 @@ namespace
{ {
/// select query has database and table names as AST pointers /// select query has database and table names as AST pointers
/// Создает копию запроса, меняет имена базы данных и таблицы. /// Создает копию запроса, меняет имена базы данных и таблицы.
inline ASTPtr rewriteSelectQuery(const ASTPtr & query, const std::string & database, const std::string & table) inline ASTPtr rewriteSelectQuery(ASTPtr & query, const std::string & database, const std::string & table)
{ {
auto modified_query_ast = query->clone(); auto & modified_query_ast = query;
auto & actual_query = typeid_cast<ASTSelectQuery &>(*modified_query_ast); auto & actual_query = typeid_cast<ASTSelectQuery &>(*modified_query_ast);
actual_query.database = new ASTIdentifier{{}, database, ASTIdentifier::Database}; actual_query.database = new ASTIdentifier{{}, database, ASTIdentifier::Database};