| 918 | } |
| 919 | |
| 920 | static 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 | |
| 943 | void ReadFromRemote::describeDistributedPlan(FormatSettings & settings, const ExplainPlanOptions & options) |
| 944 | { |
no test coverage detected