summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_bigquery.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-19 10:22:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-03-19 10:22:04 +0000
commit57c3067868d0a1da90ec0f2201dd91f031241274 (patch)
tree3b16819683e27ccbc7e7726675ab8d3e978fc8aa /tests/dialects/test_bigquery.py
parentAdding upstream version 11.3.6. (diff)
downloadsqlglot-57c3067868d0a1da90ec0f2201dd91f031241274.tar.xz
sqlglot-57c3067868d0a1da90ec0f2201dd91f031241274.zip
Adding upstream version 11.4.1.upstream/11.4.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_bigquery.py')
-rw-r--r--tests/dialects/test_bigquery.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/dialects/test_bigquery.py b/tests/dialects/test_bigquery.py
index 22387da..e731b50 100644
--- a/tests/dialects/test_bigquery.py
+++ b/tests/dialects/test_bigquery.py
@@ -8,6 +8,9 @@ class TestBigQuery(Validator):
def test_bigquery(self):
self.validate_identity("SELECT STRUCT<ARRAY<STRING>>(['2023-01-17'])")
self.validate_identity("SELECT * FROM q UNPIVOT(values FOR quarter IN (b, c))")
+ self.validate_identity(
+ "SELECT * FROM (SELECT * FROM `t`) AS a UNPIVOT((c) FOR c_name IN (v1, v2))"
+ )
self.validate_all("LEAST(x, y)", read={"sqlite": "MIN(x, y)"})
self.validate_all(
@@ -280,7 +283,7 @@ class TestBigQuery(Validator):
"duckdb": "CURRENT_DATE + INTERVAL 1 DAY",
"mysql": "DATE_ADD(CURRENT_DATE, INTERVAL 1 DAY)",
"postgres": "CURRENT_DATE + INTERVAL '1' DAY",
- "presto": "DATE_ADD(DAY, 1, CURRENT_DATE)",
+ "presto": "DATE_ADD('DAY', 1, CURRENT_DATE)",
"hive": "DATE_ADD(CURRENT_DATE, 1)",
"spark": "DATE_ADD(CURRENT_DATE, 1)",
},