ClickHouse/src/Interpreters/replaceAliasColumnsInQuery.cpp

18 lines
567 B
C++
Raw Normal View History

2020-12-12 16:42:15 +00:00
#include <Interpreters/replaceAliasColumnsInQuery.h>
#include <Interpreters/ColumnAliasesVisitor.h>
#include <Storages/ColumnsDescription.h>
#include <Parsers/ASTSelectQuery.h>
namespace DB
{
2021-06-17 15:00:03 +00:00
void replaceAliasColumnsInQuery(
2021-05-21 17:01:21 +00:00
ASTPtr & ast, const ColumnsDescription & columns, const NameToNameMap & array_join_result_to_source, ContextPtr context)
2020-12-12 16:42:15 +00:00
{
2021-05-21 17:01:21 +00:00
ColumnAliasesVisitor::Data aliases_column_data(columns, array_join_result_to_source, context);
ColumnAliasesVisitor aliases_column_visitor(aliases_column_data);
aliases_column_visitor.visit(ast);
2020-12-12 16:42:15 +00:00
}
}