aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Interpreters/InterpreterDescribeQuery.h
blob: c0b380d57ab0a1dacdfe97178ddfe20d7e991abf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once

#include <Interpreters/IInterpreter.h>
#include <Parsers/IAST_fwd.h>


namespace DB
{

/** Return names, types and other information about columns in specified table.
  */
class InterpreterDescribeQuery : public IInterpreter, WithContext
{
public:
    InterpreterDescribeQuery(const ASTPtr & query_ptr_, ContextPtr context_) : WithContext(context_), query_ptr(query_ptr_) {}

    BlockIO execute() override;

    static Block getSampleBlock(bool include_subcolumns);

private:
    ASTPtr query_ptr;
};


}