2018-09-21 15:20:23 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#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
|
2021-04-10 23:33:54 +00:00
|
|
|
class InterpreterExplainQuery : public IInterpreter, WithContext
|
2018-09-21 15:20:23 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-04-10 23:33:54 +00:00
|
|
|
InterpreterExplainQuery(const ASTPtr & query_, ContextPtr context_) : WithContext(context_), query(query_) { }
|
2018-09-21 15:20:23 +00:00
|
|
|
|
|
|
|
BlockIO execute() override;
|
|
|
|
|
|
|
|
static Block getSampleBlock();
|
|
|
|
|
|
|
|
private:
|
|
|
|
ASTPtr query;
|
|
|
|
|
|
|
|
BlockInputStreamPtr executeImpl();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
}
|