diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-24 08:03:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-24 08:03:45 +0000 |
commit | ca57dc468e5d8d0920e964d45ad25271ae6e633d (patch) | |
tree | 319d8bffcb5c3e9afe9e62beca9ef401480578d2 /tests/fixtures/optimizer/qualify_tables.sql | |
parent | Adding upstream version 17.4.1. (diff) | |
download | sqlglot-ca57dc468e5d8d0920e964d45ad25271ae6e633d.tar.xz sqlglot-ca57dc468e5d8d0920e964d45ad25271ae6e633d.zip |
Adding upstream version 17.7.0.upstream/17.7.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/fixtures/optimizer/qualify_tables.sql | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/fixtures/optimizer/qualify_tables.sql b/tests/fixtures/optimizer/qualify_tables.sql index cd749a0..f43ac01 100644 --- a/tests/fixtures/optimizer/qualify_tables.sql +++ b/tests/fixtures/optimizer/qualify_tables.sql @@ -101,3 +101,11 @@ SELECT * FROM (SELECT * FROM c.db.tbl1 AS tbl1 JOIN c.db.tbl2 AS tbl2 ON id1 = i # title: join construct within join construct SELECT * FROM (tbl1 AS tbl1 JOIN (tbl2 AS tbl2 JOIN tbl3 AS tbl3 ON id2 = id3) AS _q_0 ON id1 = id3) AS _q_1; SELECT * FROM (SELECT * FROM c.db.tbl1 AS tbl1 JOIN (SELECT * FROM c.db.tbl2 AS tbl2 JOIN c.db.tbl3 AS tbl3 ON id2 = id3) AS _q_0 ON id1 = id3) AS _q_1; + +# title: wrapped subquery without alias +SELECT * FROM ((SELECT * FROM t)); +SELECT * FROM ((SELECT * FROM c.db.t AS t) AS _q_0); + +# title: wrapped subquery without alias joined with a table +SELECT * FROM ((SELECT * FROM t1) INNER JOIN t2 ON a = b); +SELECT * FROM ((SELECT * FROM c.db.t1 AS t1) AS _q_0 INNER JOIN c.db.t2 AS t2 ON a = b); |