summaryrefslogtreecommitdiffstats
path: root/tests/test_parser.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-03 07:31:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-03 07:31:54 +0000
commitb38d717d5933fdae3fe85c87df7aee9a251fb58e (patch)
tree6db21a44ffea4c832dcab29688bfaf1c1dc124f9 /tests/test_parser.py
parentReleasing debian version 11.4.1-1. (diff)
downloadsqlglot-b38d717d5933fdae3fe85c87df7aee9a251fb58e.tar.xz
sqlglot-b38d717d5933fdae3fe85c87df7aee9a251fb58e.zip
Merging upstream version 11.4.5.
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, 4 insertions, 1 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py
index 861e47f..07a5fd7 100644
--- a/tests/test_parser.py
+++ b/tests/test_parser.py
@@ -79,6 +79,9 @@ class TestParser(unittest.TestCase):
def test_union_order(self):
self.assertIsInstance(parse_one("SELECT * FROM (SELECT 1) UNION SELECT 2"), exp.Union)
+ self.assertIsInstance(
+ parse_one("SELECT x FROM y HAVING x > (SELECT 1) UNION SELECT 2"), exp.Union
+ )
def test_select(self):
self.assertIsNotNone(parse_one("select 1 natural"))
@@ -357,7 +360,7 @@ class TestParser(unittest.TestCase):
@patch("sqlglot.parser.logger")
def test_create_table_error(self, logger):
parse_one(
- """CREATE TABLE PARTITION""",
+ """CREATE TABLE SELECT""",
error_level=ErrorLevel.WARN,
)