ClickHouse/dbms/src/Interpreters/InterpreterExplainQuery.h
2019-03-11 17:01:45 +03:00

32 lines
533 B
C++

#pragma once
#include <Interpreters/Context.h>
#include <Interpreters/IInterpreter.h>
#include <Parsers/IAST_fwd.h>
namespace DB
{
/// Returns single row with explain results
class InterpreterExplainQuery : public IInterpreter
{
public:
InterpreterExplainQuery(const ASTPtr & query_, const Context & context_)
: query(query_), context(context_)
{}
BlockIO execute() override;
static Block getSampleBlock();
private:
ASTPtr query;
Context context;
BlockInputStreamPtr executeImpl();
};
}