mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
Use existing alias as external table name
This commit is contained in:
parent
a3944624a0
commit
dc49303baf
@ -78,13 +78,17 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
String external_table_name = subquery_or_table_name->tryGetAlias();
|
||||
if (external_table_name.empty())
|
||||
{
|
||||
/// Generate the name for the external table.
|
||||
String external_table_name = "_data" + toString(external_table_id);
|
||||
external_table_name = "_data" + toString(external_table_id);
|
||||
while (external_tables.count(external_table_name))
|
||||
{
|
||||
++external_table_id;
|
||||
external_table_name = "_data" + toString(external_table_id);
|
||||
}
|
||||
}
|
||||
|
||||
auto interpreter = interpretSubquery(subquery_or_table_name, context, subquery_depth, {});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user