From 3e55907113f8d6e69b714435e19386e5947972be Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Fri, 20 Sep 2024 15:14:16 -0700 Subject: [PATCH] bump scope limit --- sqlglot/optimizer/scope.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlglot/optimizer/scope.py b/sqlglot/optimizer/scope.py index 33031ab3f2..0a98d57b73 100644 --- a/sqlglot/optimizer/scope.py +++ b/sqlglot/optimizer/scope.py @@ -14,7 +14,7 @@ TRAVERSABLES = (exp.Query, exp.DDL, exp.DML) -MAX_SCOPE_DEPTH = 200 +MAX_SCOPE_DEPTH = 500 class ScopeType(Enum): @@ -478,7 +478,7 @@ def traverse(self): actual_depth = len(result) if actual_depth > MAX_SCOPE_DEPTH: raise OptimizeError( - f"Scope depth limit({actual_depth}) exceeded max depth limit({MAX_SCOPE_DEPTH})" + f"Scope depth limit of {MAX_SCOPE_DEPTH} exceeded" ) yield from reversed(result)