diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-10 06:44:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-10 06:44:54 +0000 |
commit | d2e9401b18925b5702c5c758af7d4f5b61deb493 (patch) | |
tree | 58dbf490c0457c2908751b3e4b63af13287381ee /sqlglot/optimizer/expand_laterals.py | |
parent | Adding upstream version 11.7.1. (diff) | |
download | sqlglot-upstream/12.2.0.tar.xz sqlglot-upstream/12.2.0.zip |
Adding upstream version 12.2.0.upstream/12.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/optimizer/expand_laterals.py')
-rw-r--r-- | sqlglot/optimizer/expand_laterals.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlglot/optimizer/expand_laterals.py b/sqlglot/optimizer/expand_laterals.py index 59f3fec..5b2f706 100644 --- a/sqlglot/optimizer/expand_laterals.py +++ b/sqlglot/optimizer/expand_laterals.py @@ -29,6 +29,6 @@ def expand_laterals(expression: exp.Expression) -> exp.Expression: for column in projection.find_all(exp.Column): if not column.table and column.name in alias_to_expression: column.replace(alias_to_expression[column.name].copy()) - if isinstance(projection, exp.Alias): - alias_to_expression[projection.alias] = projection.this + if isinstance(projection, exp.Alias): + alias_to_expression[projection.alias] = projection.this return expression |