summaryrefslogtreecommitdiffstats
path: root/sqlglot/optimizer/eliminate_joins.py
diff options
context:
space:
mode:
Diffstat (limited to 'sqlglot/optimizer/eliminate_joins.py')
-rw-r--r--sqlglot/optimizer/eliminate_joins.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlglot/optimizer/eliminate_joins.py b/sqlglot/optimizer/eliminate_joins.py
index e0ddfa2..27de9c7 100644
--- a/sqlglot/optimizer/eliminate_joins.py
+++ b/sqlglot/optimizer/eliminate_joins.py
@@ -153,7 +153,7 @@ def join_condition(join):
#
# should pull y.b as the join key and x.a as the source key
if normalized(on):
- on = on if isinstance(on, exp.And) else exp.and_(on, exp.true())
+ on = on if isinstance(on, exp.And) else exp.and_(on, exp.true(), copy=False)
for condition in on.flatten():
if isinstance(condition, exp.EQ):