1
0
Fork 0

Merging upstream version 16.7.3.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 20:21:40 +01:00
parent 331a760a3d
commit 088f137198
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
75 changed files with 33866 additions and 31988 deletions

View file

@ -159,10 +159,11 @@ def explode_to_unnest(expression: exp.Expression) -> exp.Expression:
if isinstance(expression, exp.Select):
from sqlglot.optimizer.scope import build_scope
taken_select_names = set(expression.named_selects)
scope = build_scope(expression)
if not scope:
return expression
taken_select_names = set(expression.named_selects)
taken_source_names = set(scope.selected_sources)
for select in expression.selects: