diff options
Diffstat (limited to 'tests/dialects/test_dialect.py')
-rw-r--r-- | tests/dialects/test_dialect.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/dialects/test_dialect.py b/tests/dialects/test_dialect.py index 49afc62..a49d067 100644 --- a/tests/dialects/test_dialect.py +++ b/tests/dialects/test_dialect.py @@ -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()", + }, + ) |