| 176 | } |
| 177 | |
| 178 | StoragePtr TableFunctionExplain::executeImpl( |
| 179 | const ASTPtr & /*ast_function*/, ContextPtr context, const std::string & table_name, ColumnsDescription /*cached_columns*/, bool is_insert_query) const |
| 180 | { |
| 181 | /// To support settings inside explain subquery. |
| 182 | auto mutable_context = Context::createCopy(context); |
| 183 | InterpreterSetQuery::applySettingsFromQuery(query, mutable_context); |
| 184 | BlockIO blockio = getInterpreter(mutable_context).execute(); |
| 185 | Block block = executeMonoBlock(blockio.pipeline); |
| 186 | |
| 187 | StorageID storage_id(getDatabaseName(), table_name); |
| 188 | auto storage = std::make_shared<StorageValues>(storage_id, getActualTableStructure(context, is_insert_query), std::move(block)); |
| 189 | storage->startup(); |
| 190 | return storage; |
| 191 | } |
| 192 | |
| 193 | InterpreterExplainQuery TableFunctionExplain::getInterpreter(ContextPtr context) const |
| 194 | { |
nothing calls this directly
no test coverage detected