mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 17:20:50 +00:00
dbms: implemented method 'pull' for GLOBAL subqueries [#METR-17758].
This commit is contained in:
parent
9f38f15294
commit
66b130a2e5
@ -120,7 +120,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
/// Отправить на удаленные реплики все временные таблицы
|
||||
/// Отправить на удаленные серверы все временные таблицы.
|
||||
void sendExternalTables()
|
||||
{
|
||||
size_t count = parallel_replicas->size();
|
||||
@ -151,6 +151,7 @@ protected:
|
||||
parallel_replicas->sendExternalTablesData(external_tables_data);
|
||||
}
|
||||
|
||||
|
||||
Block readImpl() override
|
||||
{
|
||||
if (!sent_query)
|
||||
|
@ -129,7 +129,7 @@ private:
|
||||
NamesAndTypesListPtr chooseColumns(Cluster & cluster, const String & database, const String & table, const Context & context) const
|
||||
{
|
||||
/// Запрос на описание таблицы
|
||||
String query = "DESC TABLE " + database + "." + table;
|
||||
String query = "DESC TABLE " + backQuoteIfNeed(database) + "." + backQuoteIfNeed(table);
|
||||
Settings settings = context.getSettings();
|
||||
NamesAndTypesList res;
|
||||
|
||||
|
@ -443,13 +443,8 @@ void Context::addExternalTable(const String & table_name, StoragePtr storage)
|
||||
if (process_list_elem)
|
||||
{
|
||||
Poco::ScopedLock<Poco::Mutex> lock(shared->mutex);
|
||||
|
||||
std::cerr << "adding temporary table with " << current_query_id << ", " << table_name << " \n";
|
||||
|
||||
shared->process_list.addTemporaryTable(*process_list_elem, table_name, storage);
|
||||
}
|
||||
else
|
||||
std::cerr << "no process list element";
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,7 +168,10 @@ BlockInputStreams StorageDistributed::read(
|
||||
if (settings.limits.max_network_bandwidth)
|
||||
throttler.reset(new Throttler(settings.limits.max_network_bandwidth));
|
||||
|
||||
Tables external_tables = context.getExternalTables();
|
||||
Tables external_tables;
|
||||
|
||||
if (settings.global_subqueries_method == GlobalSubqueriesMethod::PUSH)
|
||||
external_tables = context.getExternalTables();
|
||||
|
||||
/// Цикл по шардам.
|
||||
for (auto & conn_pool : cluster.pools)
|
||||
|
Loading…
Reference in New Issue
Block a user