| 32 | |
| 33 | |
| 34 | TemporaryBlockStreamHolder flushToFile(const TemporaryDataOnDiskScopePtr & tmp_data, const Block & header, QueryPipelineBuilder pipeline) |
| 35 | { |
| 36 | TemporaryBlockStreamHolder stream_holder(std::make_shared<const Block>(header), tmp_data); |
| 37 | |
| 38 | auto exec_pipeline = QueryPipelineBuilder::getPipeline(std::move(pipeline)); |
| 39 | PullingPipelineExecutor executor(exec_pipeline); |
| 40 | |
| 41 | Block block; |
| 42 | while (executor.pull(block)) |
| 43 | stream_holder->write(block); |
| 44 | |
| 45 | stream_holder.finishWriting(); |
| 46 | return stream_holder; |
| 47 | } |
| 48 | |
| 49 | SortedBlocksWriter::SortedFiles flushToManyFiles(const TemporaryDataOnDiskScopePtr & tmp_data, QueryPipelineBuilder builder, |
| 50 | std::function<void(const Block &)> callback) |
no test coverage detected