MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / flushToManyFiles

Function flushToManyFiles

src/Interpreters/SortedBlocksWriter.cpp:49–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49SortedBlocksWriter::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

Callers 1

finishMergeMethod · 0.85

Calls 5

flushBlockToFileFunction · 0.85
callbackFunction · 0.50
pullMethod · 0.45
rowsMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected