| 47 | } |
| 48 | |
| 49 | SortedBlocksWriter::SortedFiles flushToManyFiles(const TemporaryDataOnDiskScopePtr & tmp_data, QueryPipelineBuilder builder, |
| 50 | std::function<void(const Block &)> callback) |
| 51 | { |
| 52 | SortedBlocksWriter::SortedFiles files; |
| 53 | auto pipeline = QueryPipelineBuilder::getPipeline(std::move(builder)); |
| 54 | PullingPipelineExecutor executor(pipeline); |
| 55 | |
| 56 | Block block; |
| 57 | while (executor.pull(block)) |
| 58 | { |
| 59 | if (!block.rows()) |
| 60 | continue; |
| 61 | callback(block); |
| 62 | files.push_back(flushBlockToFile(tmp_data, block)); |
| 63 | } |
| 64 | |
| 65 | return files; |
| 66 | } |
| 67 | |
| 68 | } |
| 69 |
no test coverage detected