diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-06 07:48:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-06 07:48:08 +0000 |
commit | b737ee75da2515a4a53956e41ae85e29dd67f21d (patch) | |
tree | 3896f4cac8aebc31f5cdb32a111fa801aba7ca22 /tests/dialects/test_bigquery.py | |
parent | Adding upstream version 17.7.0. (diff) | |
download | sqlglot-b737ee75da2515a4a53956e41ae85e29dd67f21d.tar.xz sqlglot-b737ee75da2515a4a53956e41ae85e29dd67f21d.zip |
Adding upstream version 17.9.1.upstream/17.9.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.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/dialects/test_bigquery.py b/tests/dialects/test_bigquery.py index 69042be..8d01ebe 100644 --- a/tests/dialects/test_bigquery.py +++ b/tests/dialects/test_bigquery.py @@ -29,6 +29,10 @@ class TestBigQuery(Validator): with self.assertRaises(ParseError): transpile("SELECT * FROM UNNEST(x) AS x(y)", read="bigquery") + with self.assertRaises(ParseError): + transpile("DATE_ADD(x, day)", read="bigquery") + + self.validate_identity("STRING_AGG(DISTINCT a ORDER BY b DESC, c DESC LIMIT 10)") self.validate_identity("SELECT PARSE_TIMESTAMP('%c', 'Thu Dec 25 07:30:00 2008', 'UTC')") self.validate_identity("SELECT ANY_VALUE(fruit HAVING MAX sold) FROM fruits") self.validate_identity("SELECT ANY_VALUE(fruit HAVING MIN sold) FROM fruits") @@ -389,7 +393,7 @@ class TestBigQuery(Validator): }, ) self.validate_all( - "current_timestamp", + "CURRENT_TIMESTAMP", write={ "bigquery": "CURRENT_TIMESTAMP()", "duckdb": "CURRENT_TIMESTAMP", @@ -400,7 +404,7 @@ class TestBigQuery(Validator): }, ) self.validate_all( - "current_timestamp()", + "CURRENT_TIMESTAMP()", write={ "bigquery": "CURRENT_TIMESTAMP()", "duckdb": "CURRENT_TIMESTAMP", |