mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
17 lines
536 B
C++
17 lines
536 B
C++
#include <Interpreters/replaceAliasColumnsInQuery.h>
|
|
#include <Interpreters/ColumnAliasesVisitor.h>
|
|
#include <Storages/ColumnsDescription.h>
|
|
#include <Parsers/ASTSelectQuery.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
void replaceAliasColumnsInQuery(ASTPtr & ast, const ColumnsDescription & columns, const NameSet & forbidden_columns, ContextPtr context)
|
|
{
|
|
ColumnAliasesVisitor::Data aliases_column_data(columns, forbidden_columns, context);
|
|
ColumnAliasesVisitor aliases_column_visitor(aliases_column_data);
|
|
aliases_column_visitor.visit(ast);
|
|
}
|
|
|
|
}
|