2019-12-12 15:28:24 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <Core/NamesAndTypes.h>
|
|
|
|
#include <Interpreters/DatabaseAndTableWithAlias.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
|
|
|
struct ASTTableExpression;
|
|
|
|
class ASTSelectQuery;
|
|
|
|
class Context;
|
|
|
|
|
2019-12-12 16:54:04 +00:00
|
|
|
NameSet removeDuplicateColumns(NamesAndTypesList & columns);
|
|
|
|
|
2019-12-12 15:28:24 +00:00
|
|
|
std::vector<const ASTTableExpression *> getTableExpressions(const ASTSelectQuery & select_query);
|
|
|
|
const ASTTableExpression * getTableExpression(const ASTSelectQuery & select, size_t table_number);
|
|
|
|
ASTPtr extractTableExpression(const ASTSelectQuery & select, size_t table_number);
|
|
|
|
|
|
|
|
NamesAndTypesList getColumnsFromTableExpression(const ASTTableExpression & table_expression, const Context & context);
|
2019-12-13 18:46:55 +00:00
|
|
|
std::vector<TableWithColumnNames> getDatabaseAndTablesWithColumnNames(const std::vector<const ASTTableExpression *> & table_expressions,
|
|
|
|
const Context & context, bool remove_duplicates = true);
|
2019-12-12 15:28:24 +00:00
|
|
|
|
|
|
|
}
|