summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_spark.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-16 11:37:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-10-16 11:37:35 +0000
commit45eab59f38aae326a4970767f9bc7119bef339b9 (patch)
treef5a21c1bba9fd891c923cc14206986691931ca47 /tests/dialects/test_spark.py
parentAdding upstream version 18.11.6. (diff)
downloadsqlglot-45eab59f38aae326a4970767f9bc7119bef339b9.tar.xz
sqlglot-45eab59f38aae326a4970767f9bc7119bef339b9.zip
Adding upstream version 18.13.0.upstream/18.13.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_spark.py')
-rw-r--r--tests/dialects/test_spark.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/dialects/test_spark.py b/tests/dialects/test_spark.py
index 0148e55..9bb9d79 100644
--- a/tests/dialects/test_spark.py
+++ b/tests/dialects/test_spark.py
@@ -361,7 +361,18 @@ TBLPROPERTIES (
"SELECT CAST(123456 AS VARCHAR(3))",
write={
"": "SELECT TRY_CAST(123456 AS TEXT)",
+ "databricks": "SELECT TRY_CAST(123456 AS STRING)",
"spark": "SELECT CAST(123456 AS STRING)",
+ "spark2": "SELECT CAST(123456 AS STRING)",
+ },
+ )
+ self.validate_all(
+ "SELECT TRY_CAST('a' AS INT)",
+ write={
+ "": "SELECT TRY_CAST('a' AS INT)",
+ "databricks": "SELECT TRY_CAST('a' AS INT)",
+ "spark": "SELECT TRY_CAST('a' AS INT)",
+ "spark2": "SELECT CAST('a' AS INT)",
},
)
self.validate_all(