| 941 | } |
| 942 | |
| 943 | void ReadFromRemote::describeDistributedPlan(FormatSettings & settings, const ExplainPlanOptions & options) |
| 944 | { |
| 945 | auto header = std::make_shared<const Block>(Block{ColumnWithTypeAndName{ColumnString::create(), std::make_shared<DataTypeString>(), "explain"}}); |
| 946 | ClusterProxy::SelectStreamFactory::Shards used_shards; |
| 947 | |
| 948 | for (const auto & shard : shards) |
| 949 | { |
| 950 | if (shard.query_plan) |
| 951 | { |
| 952 | shard.query_plan->explainPlan(settings.out, options, settings.offset / std::max<size_t>(settings.base_indent, 1) + 1); |
| 953 | } |
| 954 | else |
| 955 | { |
| 956 | auto & shard_copy = used_shards.emplace_back(shard); |
| 957 | shard_copy.header = header; |
| 958 | shard_copy.query = makeExplain(options, shard.query); |
| 959 | } |
| 960 | } |
| 961 | |
| 962 | formatExplain(settings, addPipes(used_shards, header)); |
| 963 | } |
| 964 | |
| 965 | void ReadFromRemote::describeDistributedPipeline(FormatSettings & settings, bool distributed) |
| 966 | { |
no test coverage detected