mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
QueryNormalizer only checks stack size
This commit is contained in:
parent
ba5cd016dd
commit
d7c77420b6
@ -120,7 +120,6 @@ void QueryNormalizer::visit(ASTIdentifier & node, ASTPtr & ast, Data & data)
|
||||
/// In a construct like "a AS b", where a is an alias, you must set alias b to the result of substituting alias a.
|
||||
/// Check size of the alias before cloning too large alias AST
|
||||
alias_node->checkSize(data.settings.max_expanded_ast_elements);
|
||||
current_asts.insert(alias_node.get());
|
||||
ast = alias_node->clone();
|
||||
ast->setAlias(node_alias);
|
||||
|
||||
@ -139,7 +138,6 @@ void QueryNormalizer::visit(ASTIdentifier & node, ASTPtr & ast, Data & data)
|
||||
/// Check size of the alias before cloning too large alias AST
|
||||
alias_node->checkSize(data.settings.max_expanded_ast_elements);
|
||||
auto alias_name = ast->getAliasOrColumnName();
|
||||
current_asts.insert(alias_node.get());
|
||||
ast = alias_node->clone();
|
||||
ast->setAlias(alias_name);
|
||||
|
||||
|
@ -6,7 +6,7 @@ SELECT
|
||||
val + 1 as prev,
|
||||
val + prev as val
|
||||
FROM ( SELECT 1 as val )
|
||||
; -- { serverError CYCLIC_ALIASES }
|
||||
; -- { serverError CYCLIC_ALIASES, TOO_DEEP_RECURSION }
|
||||
|
||||
|
||||
SELECT
|
||||
|
Loading…
Reference in New Issue
Block a user