summaryrefslogtreecommitdiffstats
path: root/sqlglot/optimizer/pushdown_projections.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-09-30 05:07:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-09-30 05:07:28 +0000
commit5a674d94c3ab243e2dd6a00f9edf6cc50b018512 (patch)
tree0b6fe74b5b346f0b048162b56a12885f1a2c2912 /sqlglot/optimizer/pushdown_projections.py
parentReleasing debian version 6.2.1-1. (diff)
downloadsqlglot-5a674d94c3ab243e2dd6a00f9edf6cc50b018512.tar.xz
sqlglot-5a674d94c3ab243e2dd6a00f9edf6cc50b018512.zip
Merging upstream version 6.2.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/optimizer/pushdown_projections.py')
-rw-r--r--sqlglot/optimizer/pushdown_projections.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlglot/optimizer/pushdown_projections.py b/sqlglot/optimizer/pushdown_projections.py
index 097ce04..5584830 100644
--- a/sqlglot/optimizer/pushdown_projections.py
+++ b/sqlglot/optimizer/pushdown_projections.py
@@ -37,7 +37,7 @@ def pushdown_projections(expression):
parent_selections = {SELECT_ALL}
if isinstance(scope.expression, exp.Union):
- left, right = scope.union
+ left, right = scope.union_scopes
referenced_columns[left] = parent_selections
referenced_columns[right] = parent_selections