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

Function formatExplain

src/Processors/QueryPlan/ReadFromRemote.cpp:920–941  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

918}
919
920static void formatExplain(IQueryPlanStep::FormatSettings & settings, Pipes pipes)
921{
922 String prefix(settings.offset + settings.base_indent, settings.indent_char);
923 for (auto & pipe : pipes)
924 {
925 QueryPipeline pipeline(std::move(pipe));
926 PullingPipelineExecutor executor(pipeline);
927
928 Chunk chunk;
929 while (executor.pull(chunk))
930 {
931 if (!chunk.hasColumns() || !chunk.hasRows())
932 continue;
933
934 const auto & col = chunk.getColumns().front();
935 size_t num_rows = col->size();
936
937 for (size_t row = 0; row < num_rows; ++row)
938 settings.out << prefix << col->getDataAt(row) << '\n';
939 }
940 }
941}
942
943void ReadFromRemote::describeDistributedPlan(FormatSettings & settings, const ExplainPlanOptions & options)
944{

Callers 2

Calls 7

hasColumnsMethod · 0.80
hasRowsMethod · 0.80
pullMethod · 0.45
frontMethod · 0.45
getColumnsMethod · 0.45
sizeMethod · 0.45
getDataAtMethod · 0.45

Tested by

no test coverage detected