summaryrefslogtreecommitdiffstats
path: root/tests/test_build.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-08 07:22:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-08 07:22:15 +0000
commit5b1ac5070c43c40a2b5bbc991198b0dddf45dc75 (patch)
treeed329138d5e8e5c9d5164b5c853d6f40a116f4d6 /tests/test_build.py
parentReleasing debian version 11.3.0-1. (diff)
downloadsqlglot-5b1ac5070c43c40a2b5bbc991198b0dddf45dc75.tar.xz
sqlglot-5b1ac5070c43c40a2b5bbc991198b0dddf45dc75.zip
Merging upstream version 11.3.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_build.py')
-rw-r--r--tests/test_build.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_build.py b/tests/test_build.py
index fbfbb62..718e471 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -504,6 +504,12 @@ class TestBuild(unittest.TestCase):
.window("d AS (PARTITION BY g ORDER BY h)"),
"SELECT AVG(a) OVER b, MIN(c) OVER d FROM table WINDOW b AS (PARTITION BY e ORDER BY f), d AS (PARTITION BY g ORDER BY h)",
),
+ (
+ lambda: select("*")
+ .from_("table")
+ .qualify("row_number() OVER (PARTITION BY a ORDER BY b) = 1"),
+ "SELECT * FROM table QUALIFY ROW_NUMBER() OVER (PARTITION BY a ORDER BY b) = 1",
+ ),
]:
with self.subTest(sql):
self.assertEqual(expression().sql(dialect[0] if dialect else None), sql)