summaryrefslogtreecommitdiffstats
path: root/tests/test_optimizer.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-23 19:51:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-23 19:51:10 +0000
commita95fd7b7de8c3492d8267b2007508d579ff50848 (patch)
treef17b76df363f98cda7ec9e8327e7c78a4c7f7803 /tests/test_optimizer.py
parentReleasing debian version 26.0.0-1. (diff)
downloadsqlglot-a95fd7b7de8c3492d8267b2007508d579ff50848.tar.xz
sqlglot-a95fd7b7de8c3492d8267b2007508d579ff50848.zip
Merging upstream version 26.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/test_optimizer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py
index 4a41e4a..7f2ed0d 100644
--- a/tests/test_optimizer.py
+++ b/tests/test_optimizer.py
@@ -551,6 +551,10 @@ class TestOptimizer(unittest.TestCase):
SELECT :with,WITH :expressions,CTE :this,UNION :this,SELECT :expressions,1,:expression,SELECT :expressions,2,:distinct,True,:alias, AS cte,CTE :this,SELECT :expressions,WINDOW :this,ROW(),:partition_by,y,:over,OVER,:from,FROM ((SELECT :expressions,1):limit,LIMIT :expression,10),:alias, AS cte2,:expressions,STAR,a + 1,a DIV 1,FILTER("B",LAMBDA :this,x + y,:expressions,x,y),:from,FROM (z AS z:joins,JOIN :this,z,:kind,CROSS) AS f(a),:joins,JOIN :this,a.b.c.d.e.f.g,:side,LEFT,:using,n,:order,ORDER :expressions,ORDERED :this,1,:nulls_first,True
""".strip(),
)
+ self.assertEqual(
+ optimizer.simplify.gen(parse_one("select item_id /* description */"), comments=True),
+ "SELECT :expressions,item_id /* description */",
+ )
def test_unnest_subqueries(self):
self.check_file("unnest_subqueries", optimizer.unnest_subqueries.unnest_subqueries)