1 | #pragma once |
---|---|
2 | |
3 | #include <Interpreters/Context.h> |
4 | #include <Interpreters/IInterpreter.h> |
5 | #include <Parsers/IAST_fwd.h> |
6 | |
7 | |
8 | namespace DB |
9 | { |
10 | |
11 | /// Returns single row with explain results |
12 | class InterpreterExplainQuery : public IInterpreter |
13 | { |
14 | public: |
15 | InterpreterExplainQuery(const ASTPtr & query_, const Context & context_) |
16 | : query(query_), context(context_) |
17 | {} |
18 | |
19 | BlockIO execute() override; |
20 | |
21 | static Block getSampleBlock(); |
22 | |
23 | private: |
24 | ASTPtr query; |
25 | const Context & context; |
26 | |
27 | BlockInputStreamPtr executeImpl(); |
28 | }; |
29 | |
30 | |
31 | } |
32 |