2019-12-12 15:28:24 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Core/NamesAndTypes.h>
|
2021-04-10 23:33:54 +00:00
|
|
|
#include <Interpreters/Context_fwd.h>
|
2019-12-12 15:28:24 +00:00
|
|
|
#include <Interpreters/DatabaseAndTableWithAlias.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
struct ASTTableExpression;
|
|
|
|
class ASTSelectQuery;
|
|
|
|
|
2021-06-23 14:03:39 +00:00
|
|
|
using ASTTableExprConstPtrs = std::vector<const ASTTableExpression *>;
|
|
|
|
|
2019-12-12 16:54:04 +00:00
|
|
|
NameSet removeDuplicateColumns(NamesAndTypesList & columns);
|
|
|
|
|
2021-06-23 14:03:39 +00:00
|
|
|
ASTTableExprConstPtrs getTableExpressions(const ASTSelectQuery & select_query);
|
|
|
|
|
2019-12-12 15:28:24 +00:00
|
|
|
const ASTTableExpression * getTableExpression(const ASTSelectQuery & select, size_t table_number);
|
2021-06-23 14:03:39 +00:00
|
|
|
|
2019-12-12 15:28:24 +00:00
|
|
|
ASTPtr extractTableExpression(const ASTSelectQuery & select, size_t table_number);
|
|
|
|
|
2021-06-23 14:03:39 +00:00
|
|
|
TablesWithColumns getDatabaseAndTablesWithColumns(
|
|
|
|
const ASTTableExprConstPtrs & table_expressions,
|
|
|
|
ContextPtr context,
|
2021-06-24 14:57:21 +00:00
|
|
|
bool include_all = false);
|
2019-12-12 15:28:24 +00:00
|
|
|
|
|
|
|
}
|