mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Use generic way to parallelize output for file()
+ disable parallelization for storage Null
This commit is contained in:
parent
6c03b2ef0c
commit
8603807b57
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,6 +42,8 @@ public:
|
||||
std::make_shared<NullSource>(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
|
||||
|
Loading…
Reference in New Issue
Block a user