summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_spark.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dialects/test_spark.py')
-rw-r--r--tests/dialects/test_spark.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/dialects/test_spark.py b/tests/dialects/test_spark.py
index fad858c..02d43aa 100644
--- a/tests/dialects/test_spark.py
+++ b/tests/dialects/test_spark.py
@@ -208,6 +208,13 @@ TBLPROPERTIES (
def test_spark(self):
self.validate_identity("SELECT UNIX_TIMESTAMP()")
+ self.validate_identity("TRIM(' SparkSQL ')")
+ self.validate_identity("TRIM(BOTH 'SL' FROM 'SSparkSQLS')")
+ self.validate_identity("TRIM(LEADING 'SL' FROM 'SSparkSQLS')")
+ self.validate_identity("TRIM(TRAILING 'SL' FROM 'SSparkSQLS')")
+ self.validate_all(
+ "TRIM('SL', 'SSparkSQLS')", write={"spark": "TRIM('SL' FROM 'SSparkSQLS')"}
+ )
self.validate_all(
"ARRAY_SORT(x, (left, right) -> -1)",
write={
@@ -314,5 +321,5 @@ TBLPROPERTIES (
def test_bool_or(self):
self.validate_all(
"SELECT a, LOGICAL_OR(b) FROM table GROUP BY a",
- write={"duckdb": "SELECT a, BOOL_OR(b) FROM table GROUP BY a"},
+ write={"spark": "SELECT a, BOOL_OR(b) FROM table GROUP BY a"},
)