1#pragma once
2
3#include <Core/NamesAndTypes.h>
4#include <Interpreters/DatabaseAndTableWithAlias.h>
5
6namespace DB
7{
8
9struct ASTTableExpression;
10class ASTSelectQuery;
11class Context;
12
13NameSet removeDuplicateColumns(NamesAndTypesList & columns);
14
15std::vector<const ASTTableExpression *> getTableExpressions(const ASTSelectQuery & select_query);
16const ASTTableExpression * getTableExpression(const ASTSelectQuery & select, size_t table_number);
17ASTPtr extractTableExpression(const ASTSelectQuery & select, size_t table_number);
18
19NamesAndTypesList getColumnsFromTableExpression(const ASTTableExpression & table_expression, const Context & context);
20std::vector<TableWithColumnNames> getDatabaseAndTablesWithColumnNames(const std::vector<const ASTTableExpression *> & table_expressions,
21 const Context & context, bool remove_duplicates = true);
22
23}
24