mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 20:42:04 +00:00
Small refactoring
This commit is contained in:
parent
f4c4b58e64
commit
887b49649c
@ -4515,19 +4515,7 @@ void QueryAnalyzer::resolveTableFunction(QueryTreeNodePtr & table_function_node,
|
|||||||
TableFunctionPtr table_function_ptr = TableFunctionFactory::instance().tryGet(table_function_name, scope_context);
|
TableFunctionPtr table_function_ptr = TableFunctionFactory::instance().tryGet(table_function_name, scope_context);
|
||||||
if (!table_function_ptr)
|
if (!table_function_ptr)
|
||||||
{
|
{
|
||||||
String database_name = scope_context->getCurrentDatabase();
|
auto [database_name, table_name] = extractDatabaseAndTableNameForParametrizedView(table_function_name, scope_context);
|
||||||
String table_name;
|
|
||||||
|
|
||||||
Identifier table_identifier{table_function_name};
|
|
||||||
if (table_identifier.getPartsSize() == 1)
|
|
||||||
{
|
|
||||||
table_name = table_identifier[0];
|
|
||||||
}
|
|
||||||
else if (table_identifier.getPartsSize() == 2)
|
|
||||||
{
|
|
||||||
database_name = table_identifier[0];
|
|
||||||
table_name = table_identifier[1];
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Collect parametrized view arguments
|
/// Collect parametrized view arguments
|
||||||
NameToNameMap view_params;
|
NameToNameMap view_params;
|
||||||
|
Loading…
Reference in New Issue
Block a user