summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_dialect.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-05 18:41:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-05 18:41:08 +0000
commitba1aee6c083034bff5350be94acca6706d437491 (patch)
tree63bd1b1080121002fea92c6007583016c9e83b45 /tests/dialects/test_dialect.py
parentAdding upstream version 9.0.3. (diff)
downloadsqlglot-ba1aee6c083034bff5350be94acca6706d437491.tar.xz
sqlglot-ba1aee6c083034bff5350be94acca6706d437491.zip
Adding upstream version 9.0.6.upstream/9.0.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_dialect.py')
-rw-r--r--tests/dialects/test_dialect.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/dialects/test_dialect.py b/tests/dialects/test_dialect.py
index 5d1cf13..3b837df 100644
--- a/tests/dialects/test_dialect.py
+++ b/tests/dialects/test_dialect.py
@@ -82,6 +82,28 @@ class TestDialect(Validator):
},
)
self.validate_all(
+ "CAST(a AS BINARY(4))",
+ read={
+ "presto": "CAST(a AS VARBINARY(4))",
+ "sqlite": "CAST(a AS VARBINARY(4))",
+ },
+ write={
+ "bigquery": "CAST(a AS BINARY(4))",
+ "clickhouse": "CAST(a AS BINARY(4))",
+ "duckdb": "CAST(a AS BINARY(4))",
+ "mysql": "CAST(a AS BINARY(4))",
+ "hive": "CAST(a AS BINARY(4))",
+ "oracle": "CAST(a AS BLOB(4))",
+ "postgres": "CAST(a AS BYTEA(4))",
+ "presto": "CAST(a AS VARBINARY(4))",
+ "redshift": "CAST(a AS VARBYTE(4))",
+ "snowflake": "CAST(a AS BINARY(4))",
+ "sqlite": "CAST(a AS BLOB(4))",
+ "spark": "CAST(a AS BINARY(4))",
+ "starrocks": "CAST(a AS BINARY(4))",
+ },
+ )
+ self.validate_all(
"CAST(MAP('a', '1') AS MAP(TEXT, TEXT))",
write={
"clickhouse": "CAST(map('a', '1') AS Map(TEXT, TEXT))",