diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-03 09:12:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-03 09:12:28 +0000 |
commit | 67c28dbe67209effad83d93b850caba5ee1e20e3 (patch) | |
tree | dffdfbfb4f0899c92a4c978e6eac55af2ff76367 /tests/test_transforms.py | |
parent | Releasing debian version 11.5.2-1. (diff) | |
download | sqlglot-67c28dbe67209effad83d93b850caba5ee1e20e3.tar.xz sqlglot-67c28dbe67209effad83d93b850caba5ee1e20e3.zip |
Merging upstream version 11.7.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/test_transforms.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_transforms.py b/tests/test_transforms.py index 1e85b80..24d8c30 100644 --- a/tests/test_transforms.py +++ b/tests/test_transforms.py @@ -106,6 +106,11 @@ class TestTransforms(unittest.TestCase): "SELECT c2, SUM(c3) OVER (PARTITION BY c2) AS r FROM t1 WHERE c3 < 4 GROUP BY c2, c3 HAVING SUM(c1) > 3 QUALIFY r IN (SELECT MIN(c1) FROM test GROUP BY c2 HAVING MIN(c1) > 3)", "SELECT c2, r FROM (SELECT c2, SUM(c3) OVER (PARTITION BY c2) AS r, c1 FROM t1 WHERE c3 < 4 GROUP BY c2, c3 HAVING SUM(c1) > 3) AS _t WHERE r IN (SELECT MIN(c1) FROM test GROUP BY c2 HAVING MIN(c1) > 3)", ) + self.validate( + eliminate_qualify, + "SELECT x FROM y QUALIFY ROW_NUMBER() OVER (PARTITION BY p)", + "SELECT x FROM (SELECT x, ROW_NUMBER() OVER (PARTITION BY p) AS _w, p FROM y) AS _t WHERE _w", + ) def test_remove_precision_parameterized_types(self): self.validate( |