ClickHouse/src/Interpreters/InterpreterExplainQuery.h

28 lines
542 B
C++
Raw Normal View History

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>
2021-07-09 10:29:45 +00:00
#include <Parsers/ASTExplainQuery.h>
2018-09-21 15:20:23 +00:00
namespace DB
{
/// Returns single row with explain results
class InterpreterExplainQuery : public IInterpreter, WithContext
2018-09-21 15:20:23 +00:00
{
public:
InterpreterExplainQuery(const ASTPtr & query_, ContextPtr context_) : WithContext(context_), query(query_) { }
2018-09-21 15:20:23 +00:00
BlockIO execute() override;
2021-09-15 19:35:48 +00:00
static Block getSampleBlock(ASTExplainQuery::ExplainKind kind);
2018-09-21 15:20:23 +00:00
private:
ASTPtr query;
2021-09-15 19:35:48 +00:00
QueryPipeline executeImpl();
2018-09-21 15:20:23 +00:00
};
}