Update DatabasesCommon.cpp

This commit is contained in:
alexey-milovidov 2019-07-20 02:51:20 +03:00 committed by GitHub
parent 6ba4408741
commit 3abf1b278e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ std::pair<String, StoragePtr> createTableFromDefinition(
if (ast_create_query.as_table_function)
{
const auto * table_function = ast_create_query.as_table_function->as<ASTFunction>();
const auto & table_function = ast_create_query.as_table_function->as<ASTFunction &>();
const auto & factory = TableFunctionFactory::instance();
StoragePtr storage = factory.get(table_function->name, context)->execute(ast_create_query.as_table_function, context, ast_create_query.table);
return {ast_create_query.table, storage};