diff --git a/dbms/src/Interpreters/InterpreterSelectQuery.cpp b/dbms/src/Interpreters/InterpreterSelectQuery.cpp index 6aaf2bd94f6..34d6b62ee24 100644 --- a/dbms/src/Interpreters/InterpreterSelectQuery.cpp +++ b/dbms/src/Interpreters/InterpreterSelectQuery.cpp @@ -1546,7 +1546,7 @@ void InterpreterSelectQuery::executeFetchColumns( if constexpr (pipeline_with_processors) { - pipeline.setMaxThreads(max_streams); + pipeline.setMaxThreads(streams.size()); /// Unify streams. They must have same headers. if (streams.size() > 1)