summaryrefslogtreecommitdiffstats
path: root/tests/test_parser.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:24:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-04 07:24:05 +0000
commit621555af37594a213d91ea113d5fc7739af84d40 (patch)
tree5aaa3b586692062accffc21cfaaa5a3917ee77b3 /tests/test_parser.py
parentAdding upstream version 10.2.9. (diff)
downloadsqlglot-621555af37594a213d91ea113d5fc7739af84d40.tar.xz
sqlglot-621555af37594a213d91ea113d5fc7739af84d40.zip
Adding upstream version 10.4.2.upstream/10.4.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r--tests/test_parser.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 0be15e4..ae2e4cd 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -76,6 +76,9 @@ class TestParser(unittest.TestCase):
tables = [t.sql() for t in parse_one("select * from a, b.c, .d").find_all(exp.Table)]
self.assertEqual(tables, ["a", "b.c", "d"])
+ def test_union_order(self):
+ self.assertIsInstance(parse_one("SELECT * FROM (SELECT 1) UNION SELECT 2"), exp.Union)
+
def test_select(self):
self.assertIsNotNone(parse_one("select 1 natural"))
self.assertIsNotNone(parse_one("select * from (select 1) x order by x.y").args["order"])