diff --git a/src/Storages/StorageFile.cpp b/src/Storages/StorageFile.cpp index 1b195d2eb47..7e5a93c13c1 100644 --- a/src/Storages/StorageFile.cpp +++ b/src/Storages/StorageFile.cpp @@ -791,15 +791,7 @@ Pipe StorageFile::read( std::move(read_buffer))); } - Pipe pipe = Pipe::unitePipes(std::move(pipes)); - /// Parallelize output as much as possible - /// Note: number of streams can be 0 if paths is empty - /// It happens if globs in file(path, ...) expands to empty set i.e. no files to process - if (num_streams > 0 && num_streams < max_num_streams) - { - pipe.resize(max_num_streams); - } - return pipe; + return Pipe::unitePipes(std::move(pipes)); } diff --git a/src/Storages/StorageNull.h b/src/Storages/StorageNull.h index 2270731c0e3..24ddb311b65 100644 --- a/src/Storages/StorageNull.h +++ b/src/Storages/StorageNull.h @@ -42,6 +42,8 @@ public: std::make_shared(storage_snapshot->getSampleBlockForColumns(column_names))); } + bool parallelizeOutputAfterReading() const override { return false; } + bool supportsParallelInsert() const override { return true; } SinkToStoragePtr write(const ASTPtr &, const StorageMetadataPtr & metadata_snapshot, ContextPtr) override