ClickHouse/dbms/src/Interpreters/getTableExpressions.h

24 lines
909 B
C++
Raw Normal View History

#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);
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);
std::vector<TableWithColumnNames> getDatabaseAndTablesWithColumnNames(const std::vector<const ASTTableExpression *> & table_expressions,
const Context & context, bool remove_duplicates = true);
}