2018-09-21 15:20:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
2019-02-11 19:53:55 +00:00
|
|
|
#include <Interpreters/Context.h>
|
2018-09-21 15:20:23 +00:00
|
|
|
#include <Interpreters/IInterpreter.h>
|
2019-03-11 14:01:45 +00:00
|
|
|
#include <Parsers/IAST_fwd.h>
|
2018-09-21 15:20:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
/// Returns single row with explain results
|
|
|
|
class InterpreterExplainQuery : public IInterpreter
|
|
|
|
{
|
|
|
|
public:
|
2019-02-11 19:53:55 +00:00
|
|
|
InterpreterExplainQuery(const ASTPtr & query_, const Context & context_)
|
|
|
|
: query(query_), context(context_)
|
2018-09-21 15:20:23 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
BlockIO execute() override;
|
|
|
|
|
|
|
|
static Block getSampleBlock();
|
|
|
|
|
|
|
|
private:
|
|
|
|
ASTPtr query;
|
2019-11-15 18:41:18 +00:00
|
|
|
const Context & context;
|
2018-09-21 15:20:23 +00:00
|
|
|
|
|
|
|
BlockInputStreamPtr executeImpl();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|