mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Fix test fails
This commit is contained in:
parent
f421e74402
commit
605c76e66e
@ -6400,8 +6400,11 @@ void QueryAnalyzer::resolveTableFunction(QueryTreeNodePtr & table_function_node,
|
||||
{
|
||||
|
||||
String database_name = scope.context->getCurrentDatabase();
|
||||
String table_name = table_function_node->getOriginalAST()->as<ASTFunction>()->name;
|
||||
String table_name = "";
|
||||
|
||||
if (table_function_node->getOriginalAST() && table_function_node->getOriginalAST()->as<ASTFunction>())
|
||||
{
|
||||
table_name = table_function_node->getOriginalAST()->as<ASTFunction>()->name;
|
||||
if (table_function_node->getOriginalAST()->as<ASTFunction>()->is_compound_name)
|
||||
{
|
||||
std::vector<std::string> parts;
|
||||
@ -6413,10 +6416,11 @@ void QueryAnalyzer::resolveTableFunction(QueryTreeNodePtr & table_function_node,
|
||||
table_name = parts[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auto & table_function_node_typed = table_function_node->as<TableFunctionNode &>();
|
||||
|
||||
StoragePtr table = DatabaseCatalog::instance().tryGetTable({database_name, table_name}, scope.context->getQueryContext());
|
||||
StoragePtr table = table_name.empty() ? nullptr : DatabaseCatalog::instance().tryGetTable({database_name, table_name}, scope.context->getQueryContext());
|
||||
if (table)
|
||||
{
|
||||
if (table.get()->isView() && table->as<StorageView>() && table->as<StorageView>()->isParameterizedView())
|
||||
|
Loading…
Reference in New Issue
Block a user