summaryrefslogtreecommitdiffstats
path: root/sqlglot/optimizer/expand_multi_table_selects.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-03 06:02:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-03 06:02:50 +0000
commit766db5014d053a8aecf75d550c2a1b59022bcabf (patch)
tree7960e11339be3a1a4892d61f593903fe58fb9d55 /sqlglot/optimizer/expand_multi_table_selects.py
parentReleasing debian version 10.5.10-1. (diff)
downloadsqlglot-766db5014d053a8aecf75d550c2a1b59022bcabf.tar.xz
sqlglot-766db5014d053a8aecf75d550c2a1b59022bcabf.zip
Merging upstream version 10.6.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sqlglot/optimizer/expand_multi_table_selects.py')
-rw-r--r--sqlglot/optimizer/expand_multi_table_selects.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sqlglot/optimizer/expand_multi_table_selects.py b/sqlglot/optimizer/expand_multi_table_selects.py
index ba562df..86f0c2d 100644
--- a/sqlglot/optimizer/expand_multi_table_selects.py
+++ b/sqlglot/optimizer/expand_multi_table_selects.py
@@ -2,6 +2,14 @@ from sqlglot import exp
def expand_multi_table_selects(expression):
+ """
+ Replace multiple FROM expressions with JOINs.
+
+ Example:
+ >>> from sqlglot import parse_one
+ >>> expand_multi_table_selects(parse_one("SELECT * FROM x, y")).sql()
+ 'SELECT * FROM x CROSS JOIN y'
+ """
for from_ in expression.find_all(exp.From):
parent = from_.parent