diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-12-13 07:45:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-12-13 07:45:22 +0000 |
commit | 21f20723eed2e3b68174cc474029083f1ce32afc (patch) | |
tree | ef12b2eb7eb404213a96c82cda0b070489ffce63 /tests/test_parser.py | |
parent | Releasing debian version 25.34.0-1. (diff) | |
download | sqlglot-21f20723eed2e3b68174cc474029083f1ce32afc.tar.xz sqlglot-21f20723eed2e3b68174cc474029083f1ce32afc.zip |
Merging upstream version 26.0.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r-- | tests/test_parser.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py index b60d719..1bf951a 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -14,6 +14,10 @@ class TestParser(unittest.TestCase): parse_one("") def test_parse_into(self): + self.assertIsInstance(parse_one("(1)", into=exp.Tuple), exp.Tuple) + self.assertIsInstance(parse_one("(1,)", into=exp.Tuple), exp.Tuple) + self.assertIsInstance(parse_one("(x=1)", into=exp.Tuple), exp.Tuple) + self.assertIsInstance(parse_one("select * from t", into=exp.Select), exp.Select) self.assertIsInstance(parse_one("select * from t limit 5", into=exp.Select), exp.Select) self.assertIsInstance(parse_one("left join foo", into=exp.Join), exp.Join) @@ -23,9 +27,9 @@ class TestParser(unittest.TestCase): self.assertIsInstance( parse_one( "WHEN MATCHED THEN UPDATE SET target.salary = COALESCE(source.salary, target.salary)", - into=exp.When, + into=exp.Whens, ), - exp.When, + exp.Whens, ) with self.assertRaises(ParseError) as ctx: |