Fix LOGICAL_ERROR for max_distributed_connections=0

This commit is contained in:
Azat Khuzhin 2021-04-20 09:03:32 +03:00
parent 82b6f49516
commit 86069ffb40
3 changed files with 3 additions and 1 deletions

View File

@ -1658,7 +1658,7 @@ void InterpreterSelectQuery::executeFetchColumns(QueryProcessingStage::Enum proc
{ {
/// Table. /// Table.
if (max_streams == 0) if (max_streams == 0)
throw Exception("Logical error: zero number of streams requested", ErrorCodes::LOGICAL_ERROR); max_streams = 1;
/// If necessary, we request more sources than the number of threads - to distribute the work evenly over the threads. /// If necessary, we request more sources than the number of threads - to distribute the work evenly over the threads.
if (max_streams > 1 && !is_remote) if (max_streams > 1 && !is_remote)

View File

@ -0,0 +1 @@
0

View File

@ -0,0 +1 @@
select * from remote('127.1', system.one) settings max_distributed_connections=0;