mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
30 lines
607 B
C++
30 lines
607 B
C++
#pragma once
|
|
|
|
#include <Interpreters/IInterpreter.h>
|
|
#include <Parsers/IAST_fwd.h>
|
|
#include <Parsers/ASTExplainQuery.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Returns single row with explain results
|
|
class InterpreterExplainQuery : public IInterpreter, WithContext
|
|
{
|
|
public:
|
|
InterpreterExplainQuery(const ASTPtr & query_, ContextPtr context_) : WithContext(context_), query(query_) { }
|
|
|
|
BlockIO execute() override;
|
|
|
|
static Block getSampleBlock(ASTExplainQuery::ExplainKind kind);
|
|
|
|
bool supportsTransactions() const override { return true; }
|
|
|
|
private:
|
|
ASTPtr query;
|
|
|
|
QueryPipeline executeImpl();
|
|
};
|
|
|
|
|
|
}
|