mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-12 09:22:05 +00:00
Tru fix tests.
This commit is contained in:
parent
5ea4dc0850
commit
bef96faa1a
@ -1382,7 +1382,7 @@ void InterpreterSelectQuery::executeFetchColumns(
|
|||||||
ErrorCodes::TOO_MANY_COLUMNS);
|
ErrorCodes::TOO_MANY_COLUMNS);
|
||||||
|
|
||||||
/// General limit for the number of threads.
|
/// General limit for the number of threads.
|
||||||
query_plan.setMaxThreads(settings.max_threads);
|
size_t max_threads_execute_query = settings.max_threads;
|
||||||
|
|
||||||
/** With distributed query processing, almost no computations are done in the threads,
|
/** With distributed query processing, almost no computations are done in the threads,
|
||||||
* but wait and receive data from remote servers.
|
* but wait and receive data from remote servers.
|
||||||
@ -1395,8 +1395,7 @@ void InterpreterSelectQuery::executeFetchColumns(
|
|||||||
if (storage && storage->isRemote())
|
if (storage && storage->isRemote())
|
||||||
{
|
{
|
||||||
is_remote = true;
|
is_remote = true;
|
||||||
max_streams = settings.max_distributed_connections;
|
max_threads_execute_query = max_streams = settings.max_distributed_connections;
|
||||||
query_plan.setMaxThreads(max_streams);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UInt64 max_block_size = settings.max_block_size;
|
UInt64 max_block_size = settings.max_block_size;
|
||||||
@ -1421,8 +1420,7 @@ void InterpreterSelectQuery::executeFetchColumns(
|
|||||||
&& limit_length + limit_offset < max_block_size)
|
&& limit_length + limit_offset < max_block_size)
|
||||||
{
|
{
|
||||||
max_block_size = std::max(UInt64(1), limit_length + limit_offset);
|
max_block_size = std::max(UInt64(1), limit_length + limit_offset);
|
||||||
max_streams = 1;
|
max_threads_execute_query = max_streams = 1;
|
||||||
query_plan.setMaxThreads(max_streams);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!max_block_size)
|
if (!max_block_size)
|
||||||
@ -1529,6 +1527,8 @@ void InterpreterSelectQuery::executeFetchColumns(
|
|||||||
else
|
else
|
||||||
throw Exception("Logical error in InterpreterSelectQuery: nowhere to read", ErrorCodes::LOGICAL_ERROR);
|
throw Exception("Logical error in InterpreterSelectQuery: nowhere to read", ErrorCodes::LOGICAL_ERROR);
|
||||||
|
|
||||||
|
query_plan.setMaxThreads(max_threads_execute_query);
|
||||||
|
|
||||||
/// Aliases in table declaration.
|
/// Aliases in table declaration.
|
||||||
if (processing_stage == QueryProcessingStage::FetchColumns && alias_actions)
|
if (processing_stage == QueryProcessingStage::FetchColumns && alias_actions)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user