Skip to content

Commit

Permalink
Chore: cleanup merge_subqueries
Browse files Browse the repository at this point in the history
  • Loading branch information
tobymao committed Jun 15, 2023
1 parent 88249b8 commit d696d7f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions sqlglot/optimizer/merge_subqueries.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ def _merge_joins(outer_scope, inner_scope, from_or_join):
"""

new_joins = []
comma_joins = inner_scope.expression.args.get("from").expressions[1:]
for subquery in comma_joins:
new_joins.append(exp.Join(this=subquery, kind="CROSS"))
outer_scope.add_source(subquery.alias_or_name, inner_scope.sources[subquery.alias_or_name])

joins = inner_scope.expression.args.get("joins") or []
for join in joins:
Expand Down Expand Up @@ -334,7 +330,6 @@ def _merge_where(outer_scope, inner_scope, from_or_join):
return

expression.where(where.this, copy=False)
expression.set("where", expression.args.get("where"))


def _merge_order(outer_scope, inner_scope):
Expand Down

0 comments on commit d696d7f

Please sign in to comment.