mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 09:52:38 +00:00
Updated to calculate and send max_parsing_threads
This commit is contained in:
parent
b70878aa0e
commit
307aa127d4
@ -51,6 +51,7 @@
|
||||
#include <re2/re2.h>
|
||||
#include <filesystem>
|
||||
#include <shared_mutex>
|
||||
#include <cmath>
|
||||
|
||||
|
||||
namespace ProfileEvents
|
||||
@ -606,8 +607,11 @@ public:
|
||||
if (!read_buf)
|
||||
read_buf = createReadBuffer(current_path, storage->use_table_fd, storage->getName(), storage->table_fd, storage->compression_method, context);
|
||||
|
||||
const Settings & settings = context->getSettingsRef();
|
||||
chassert(storage->paths.size());
|
||||
const auto max_parsing_threads = std::max(settings.max_threads/storage->paths.size(),1UL);
|
||||
auto format
|
||||
= context->getInputFormat(storage->format_name, *read_buf, block_for_format, max_block_size, storage->format_settings, storage->paths.size());
|
||||
= context->getInputFormat(storage->format_name, *read_buf, block_for_format, max_block_size, storage->format_settings, max_parsing_threads);
|
||||
|
||||
QueryPipelineBuilder builder;
|
||||
builder.init(Pipe(format));
|
||||
|
Loading…
Reference in New Issue
Block a user