mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 02:21:59 +00:00
Do not replaceAliasColumnsInQuery for JOIN OR/USING sections
This commit is contained in:
parent
4b3c0a95d1
commit
a7f770ecb7
@ -954,10 +954,6 @@ TreeRewriterResultPtr TreeRewriter::analyzeSelect(
|
||||
if (const auto * join_ast = select_query->join(); join_ast && tables_with_columns.size() >= 2)
|
||||
{
|
||||
auto & table_join_ast = join_ast->table_join->as<ASTTableJoin &>();
|
||||
if (table_join_ast.using_expression_list && result.metadata_snapshot)
|
||||
replaceAliasColumnsInQuery(table_join_ast.using_expression_list, result.metadata_snapshot->getColumns(), result.array_join_result_to_source, getContext());
|
||||
if (table_join_ast.on_expression && result.metadata_snapshot)
|
||||
replaceAliasColumnsInQuery(table_join_ast.on_expression, result.metadata_snapshot->getColumns(), result.array_join_result_to_source, getContext());
|
||||
|
||||
collectJoinedColumns(*result.analyzed_join, table_join_ast, tables_with_columns, result.aliases);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user