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

Method executeImpl

src/TableFunctions/TableFunctionExplain.cpp:178–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178StoragePtr 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
193InterpreterExplainQuery TableFunctionExplain::getInterpreter(ContextPtr context) const
194{

Callers

nothing calls this directly

Calls 3

executeMonoBlockFunction · 0.85
executeMethod · 0.45
startupMethod · 0.45

Tested by

no test coverage detected