summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_spark.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/dialects/test_spark.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/dialects/test_spark.py b/tests/dialects/test_spark.py
index 0da2931..bfaed53 100644
--- a/tests/dialects/test_spark.py
+++ b/tests/dialects/test_spark.py
@@ -215,6 +215,41 @@ TBLPROPERTIES (
self.validate_identity("SPLIT(str, pattern, lim)")
self.validate_all(
+ "BOOLEAN(x)",
+ write={
+ "": "CAST(x AS BOOLEAN)",
+ "spark": "CAST(x AS BOOLEAN)",
+ },
+ )
+ self.validate_all(
+ "INT(x)",
+ write={
+ "": "CAST(x AS INT)",
+ "spark": "CAST(x AS INT)",
+ },
+ )
+ self.validate_all(
+ "STRING(x)",
+ write={
+ "": "CAST(x AS TEXT)",
+ "spark": "CAST(x AS STRING)",
+ },
+ )
+ self.validate_all(
+ "DATE(x)",
+ write={
+ "": "CAST(x AS DATE)",
+ "spark": "CAST(x AS DATE)",
+ },
+ )
+ self.validate_all(
+ "TIMESTAMP(x)",
+ write={
+ "": "CAST(x AS TIMESTAMP)",
+ "spark": "CAST(x AS TIMESTAMP)",
+ },
+ )
+ self.validate_all(
"CAST(x AS TIMESTAMP)", read={"trino": "CAST(x AS TIMESTAMP(6) WITH TIME ZONE)"}
)
self.validate_all(