Merging upstream version 10.2.6.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
40155883c5
commit
17f6b2c749
36 changed files with 1281 additions and 493 deletions
|
@ -6,6 +6,11 @@ class TestBigQuery(Validator):
|
|||
dialect = "bigquery"
|
||||
|
||||
def test_bigquery(self):
|
||||
self.validate_all(
|
||||
"REGEXP_CONTAINS('foo', '.*')",
|
||||
read={"bigquery": "REGEXP_CONTAINS('foo', '.*')"},
|
||||
write={"mysql": "REGEXP_LIKE('foo', '.*')"},
|
||||
),
|
||||
self.validate_all(
|
||||
'"""x"""',
|
||||
write={
|
||||
|
@ -94,6 +99,20 @@ class TestBigQuery(Validator):
|
|||
"spark": "SELECT * FROM UNNEST(ARRAY('7', '14')) AS (x)",
|
||||
},
|
||||
)
|
||||
self.validate_all(
|
||||
"SELECT ARRAY(SELECT x FROM UNNEST([0, 1]) AS x)",
|
||||
write={"bigquery": "SELECT ARRAY(SELECT x FROM UNNEST([0, 1]) AS x)"},
|
||||
)
|
||||
self.validate_all(
|
||||
"SELECT ARRAY(SELECT DISTINCT x FROM UNNEST(some_numbers) AS x) AS unique_numbers",
|
||||
write={
|
||||
"bigquery": "SELECT ARRAY(SELECT DISTINCT x FROM UNNEST(some_numbers) AS x) AS unique_numbers"
|
||||
},
|
||||
)
|
||||
self.validate_all(
|
||||
"SELECT ARRAY(SELECT * FROM foo JOIN bla ON x = y)",
|
||||
write={"bigquery": "SELECT ARRAY(SELECT * FROM foo JOIN bla ON x = y)"},
|
||||
)
|
||||
|
||||
self.validate_all(
|
||||
"x IS unknown",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue