Skip to content

Commit

Permalink
Chore(optimizer): fix pushdown_predicates comment example (#1732)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesittas authored Jun 6, 2023
1 parent dd29f3f commit 1eb338a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlglot/optimizer/pushdown_predicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ def pushdown_predicates(expression):
Example:
>>> import sqlglot
>>> sql = "SELECT * FROM (SELECT * FROM x AS x) AS y WHERE y.a = 1"
>>> sql = "SELECT y.a AS a FROM (SELECT x.a AS a FROM x AS x) AS y WHERE y.a = 1"
>>> expression = sqlglot.parse_one(sql)
>>> pushdown_predicates(expression).sql()
'SELECT * FROM (SELECT * FROM x AS x WHERE y.a = 1) AS y WHERE TRUE'
'SELECT y.a AS a FROM (SELECT x.a AS a FROM x AS x WHERE x.a = 1) AS y WHERE TRUE'
Args:
expression (sqlglot.Expression): expression to optimize
Expand Down

0 comments on commit 1eb338a

Please sign in to comment.