summaryrefslogtreecommitdiffstats
path: root/tests/test_transpile.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-27 10:46:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-27 10:46:36 +0000
commita8b22b4c5bdf9139a187c92b7b9f81bdeaa84888 (patch)
tree93b8523df3ce9e02e435f56e493bd9b724eb9c7c /tests/test_transpile.py
parentReleasing debian version 11.2.0-1. (diff)
downloadsqlglot-a8b22b4c5bdf9139a187c92b7b9f81bdeaa84888.tar.xz
sqlglot-a8b22b4c5bdf9139a187c92b7b9f81bdeaa84888.zip
Merging upstream version 11.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_transpile.py')
-rw-r--r--tests/test_transpile.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_transpile.py b/tests/test_transpile.py
index c0d518d..0463aed 100644
--- a/tests/test_transpile.py
+++ b/tests/test_transpile.py
@@ -28,6 +28,11 @@ class TestTranspile(unittest.TestCase):
self.assertEqual(transpile("SELECT 1 current_datetime")[0], "SELECT 1 AS current_datetime")
self.assertEqual(transpile("SELECT 1 row")[0], "SELECT 1 AS row")
+ self.assertEqual(
+ transpile("SELECT 1 FROM a.b.table1 t UNPIVOT((c3) FOR c4 IN (a, b))")[0],
+ "SELECT 1 FROM a.b.table1 AS t UNPIVOT((c3) FOR c4 IN (a, b))",
+ )
+
for key in ("union", "over", "from", "join"):
with self.subTest(f"alias {key}"):
self.validate(f"SELECT x AS {key}", f"SELECT x AS {key}")