From f73e9af131151f1e058446361c35b05c4c90bf10 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 7 Sep 2023 13:39:48 +0200 Subject: Merging upstream version 18.2.0. Signed-off-by: Daniel Baumann --- tests/dialects/test_hive.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'tests/dialects/test_hive.py') diff --git a/tests/dialects/test_hive.py b/tests/dialects/test_hive.py index 4c463f7..70a05fd 100644 --- a/tests/dialects/test_hive.py +++ b/tests/dialects/test_hive.py @@ -390,6 +390,13 @@ class TestHive(Validator): ) def test_hive(self): + self.validate_identity("SELECT * FROM my_table TIMESTAMP AS OF DATE_ADD(CURRENT_DATE, -1)") + self.validate_identity("SELECT * FROM my_table VERSION AS OF DATE_ADD(CURRENT_DATE, -1)") + + self.validate_identity( + "SELECT ROW() OVER (DISTRIBUTE BY x SORT BY y)", + "SELECT ROW() OVER (PARTITION BY x ORDER BY y)", + ) self.validate_identity("SELECT transform") self.validate_identity("SELECT * FROM test DISTRIBUTE BY y SORT BY x DESC ORDER BY l") self.validate_identity( @@ -591,7 +598,7 @@ class TestHive(Validator): read={ "": "VAR_MAP(a, b, c, d)", "clickhouse": "map(a, b, c, d)", - "duckdb": "MAP(LIST_VALUE(a, c), LIST_VALUE(b, d))", + "duckdb": "MAP([a, c], [b, d])", "hive": "MAP(a, b, c, d)", "presto": "MAP(ARRAY[a, c], ARRAY[b, d])", "spark": "MAP(a, b, c, d)", @@ -599,7 +606,7 @@ class TestHive(Validator): write={ "": "MAP(ARRAY(a, c), ARRAY(b, d))", "clickhouse": "map(a, b, c, d)", - "duckdb": "MAP(LIST_VALUE(a, c), LIST_VALUE(b, d))", + "duckdb": "MAP([a, c], [b, d])", "presto": "MAP(ARRAY[a, c], ARRAY[b, d])", "hive": "MAP(a, b, c, d)", "spark": "MAP(a, b, c, d)", @@ -609,7 +616,7 @@ class TestHive(Validator): self.validate_all( "MAP(a, b)", write={ - "duckdb": "MAP(LIST_VALUE(a), LIST_VALUE(b))", + "duckdb": "MAP([a], [b])", "presto": "MAP(ARRAY[a], ARRAY[b])", "hive": "MAP(a, b)", "spark": "MAP(a, b)", @@ -717,9 +724,7 @@ class TestHive(Validator): self.validate_identity("'\\\\n'") self.validate_identity("''") self.validate_identity("'\\\\'") - self.validate_identity("'\z'") self.validate_identity("'\\z'") - self.validate_identity("'\\\z'") self.validate_identity("'\\\\z'") def test_data_type(self): -- cgit v1.2.3