1
0
Fork 0

Merging upstream version 20.4.0.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 21:18:34 +01:00
parent 1194ddb03c
commit e4ef535ed9
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
20 changed files with 562 additions and 52 deletions

View file

@ -2056,3 +2056,40 @@ SELECT
self.assertEqual(expression.sql(dialect="mysql"), expected_sql)
self.assertEqual(expression.sql(dialect="tsql"), expected_sql)
def test_random(self):
self.validate_all(
"RAND()",
write={
"bigquery": "RAND()",
"clickhouse": "randCanonical()",
"databricks": "RAND()",
"doris": "RAND()",
"drill": "RAND()",
"duckdb": "RANDOM()",
"hive": "RAND()",
"mysql": "RAND()",
"oracle": "RAND()",
"postgres": "RANDOM()",
"presto": "RAND()",
"spark": "RAND()",
"sqlite": "RANDOM()",
"tsql": "RAND()",
},
read={
"bigquery": "RAND()",
"clickhouse": "randCanonical()",
"databricks": "RAND()",
"doris": "RAND()",
"drill": "RAND()",
"duckdb": "RANDOM()",
"hive": "RAND()",
"mysql": "RAND()",
"oracle": "RAND()",
"postgres": "RANDOM()",
"presto": "RAND()",
"spark": "RAND()",
"sqlite": "RANDOM()",
"tsql": "RAND()",
},
)