mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Normalize away WITH statement
This commit is contained in:
parent
b6a5d2f8e9
commit
9546e61bd4
@ -782,6 +782,9 @@ TreeRewriterResultPtr TreeRewriter::analyzeSelect(
|
||||
|
||||
normalize(query, result.aliases, settings);
|
||||
|
||||
// After normalization, we don't need WITH statement anymore
|
||||
select_query->setExpression(ASTSelectQuery::Expression::WITH, {});
|
||||
|
||||
/// Remove unneeded columns according to 'required_result_columns'.
|
||||
/// Leave all selected columns in case of DISTINCT; columns that contain arrayJoin function inside.
|
||||
/// Must be after 'normalizeTree' (after expanding aliases, for aliases not get lost)
|
||||
|
Loading…
Reference in New Issue
Block a user