summaryrefslogtreecommitdiffstats
path: root/tests/test_parser.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-16 09:41:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-06-16 09:41:18 +0000
commit67578a7602a5be7eb51f324086c8d49bcf8b7498 (patch)
tree0b7515c922d1c383cea24af5175379cfc8edfd15 /tests/test_parser.py
parentReleasing debian version 15.2.0-1. (diff)
downloadsqlglot-67578a7602a5be7eb51f324086c8d49bcf8b7498.tar.xz
sqlglot-67578a7602a5be7eb51f324086c8d49bcf8b7498.zip
Merging upstream version 16.2.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r--tests/test_parser.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 897357f..96192cd 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -81,6 +81,11 @@ class TestParser(unittest.TestCase):
def test_float(self):
self.assertEqual(parse_one(".2"), parse_one("0.2"))
+ def test_unnest_projection(self):
+ expr = parse_one("SELECT foo IN UNNEST(bla) AS bar")
+ self.assertIsInstance(expr.selects[0], exp.Alias)
+ self.assertEqual(expr.selects[0].output_name, "bar")
+
def test_unary_plus(self):
self.assertEqual(parse_one("+15"), exp.Literal.number(15))