diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-10 06:44:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-10 06:44:54 +0000 |
commit | d2e9401b18925b5702c5c758af7d4f5b61deb493 (patch) | |
tree | 58dbf490c0457c2908751b3e4b63af13287381ee /tests/test_expressions.py | |
parent | Adding upstream version 11.7.1. (diff) | |
download | sqlglot-d2e9401b18925b5702c5c758af7d4f5b61deb493.tar.xz sqlglot-d2e9401b18925b5702c5c758af7d4f5b61deb493.zip |
Adding upstream version 12.2.0.upstream/12.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_expressions.py')
-rw-r--r-- | tests/test_expressions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_expressions.py b/tests/test_expressions.py index eb0cf56..e7588b5 100644 --- a/tests/test_expressions.py +++ b/tests/test_expressions.py @@ -297,6 +297,9 @@ class TestExpressions(unittest.TestCase): expression = parse_one("SELECT a, b FROM x") self.assertEqual([s.sql() for s in expression.selects], ["a", "b"]) + expression = parse_one("(SELECT a, b FROM x)") + self.assertEqual([s.sql() for s in expression.selects], ["a", "b"]) + def test_alias_column_names(self): expression = parse_one("SELECT * FROM (SELECT * FROM x) AS y") subquery = expression.find(exp.Subquery) @@ -761,7 +764,7 @@ FROM foo""", "t", {"a": exp.DataType.build("TEXT"), "b": exp.DataType.build("TEXT")}, ).sql(), - "(VALUES (CAST(1 AS TEXT), CAST(2 AS TEXT)), (3, 4)) AS t(a, b)", + "(VALUES (1, 2), (3, 4)) AS t(a, b)", ) with self.assertRaises(ValueError): exp.values([(1, 2), (3, 4)], columns=["a"]) |