diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 13:45:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-02-19 13:45:09 +0000 |
commit | 639a208fa57ea674d165c4837e96f3ae4d7e3e61 (patch) | |
tree | f4d66da146c396d407cecefb5b405e609af1109e /tests/dialects/test_presto.py | |
parent | Releasing debian version 11.0.1-1. (diff) | |
download | sqlglot-639a208fa57ea674d165c4837e96f3ae4d7e3e61.tar.xz sqlglot-639a208fa57ea674d165c4837e96f3ae4d7e3e61.zip |
Merging upstream version 11.1.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/dialects/test_presto.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/dialects/test_presto.py b/tests/dialects/test_presto.py index 9815dcc..bf22652 100644 --- a/tests/dialects/test_presto.py +++ b/tests/dialects/test_presto.py @@ -366,6 +366,12 @@ class TestPresto(Validator): self.validate_identity("APPROX_PERCENTILE(a, b, c, d)") self.validate_all( + "SELECT a FROM t GROUP BY a, ROLLUP(b), ROLLUP(c), ROLLUP(d)", + write={ + "presto": "SELECT a FROM t GROUP BY a, ROLLUP (b, c, d)", + }, + ) + self.validate_all( 'SELECT a."b" FROM "foo"', write={ "duckdb": 'SELECT a."b" FROM "foo"', @@ -507,6 +513,14 @@ class TestPresto(Validator): }, ) + self.validate_all( + "SELECT a, b, c, d, sum(y) FROM z GROUP BY CUBE(a) ROLLUP(a), GROUPING SETS((b, c)), d", + write={ + "presto": "SELECT a, b, c, d, SUM(y) FROM z GROUP BY d, GROUPING SETS ((b, c)), CUBE (a), ROLLUP (a)", + "hive": "SELECT a, b, c, d, SUM(y) FROM z GROUP BY d, GROUPING SETS ((b, c)), CUBE (a), ROLLUP (a)", + }, + ) + def test_encode_decode(self): self.validate_all( "TO_UTF8(x)", |