summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_spark.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-12 08:28:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-12 08:28:54 +0000
commit7db33518a4264e422294a1e20fbd1c1505d9a62d (patch)
treeaeb9ae54563b1f8f9c26fd54d0c207b082b89cd4 /tests/dialects/test_spark.py
parentReleasing debian version 18.2.0-1. (diff)
downloadsqlglot-7db33518a4264e422294a1e20fbd1c1505d9a62d.tar.xz
sqlglot-7db33518a4264e422294a1e20fbd1c1505d9a62d.zip
Merging upstream version 18.3.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.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/dialects/test_spark.py b/tests/dialects/test_spark.py
index a892b0f..becb66a 100644
--- a/tests/dialects/test_spark.py
+++ b/tests/dialects/test_spark.py
@@ -240,6 +240,14 @@ TBLPROPERTIES (
self.validate_identity("TRIM(TRAILING 'SL' FROM 'SSparkSQLS')")
self.validate_identity("SPLIT(str, pattern, lim)")
self.validate_identity(
+ "SELECT REGEXP_REPLACE('100-200', r'([^0-9])', '')",
+ "SELECT REGEXP_REPLACE('100-200', '([^0-9])', '')",
+ )
+ self.validate_identity(
+ "SELECT REGEXP_REPLACE('100-200', R'([^0-9])', '')",
+ "SELECT REGEXP_REPLACE('100-200', '([^0-9])', '')",
+ )
+ self.validate_identity(
"SELECT STR_TO_MAP('a:1,b:2,c:3')",
"SELECT STR_TO_MAP('a:1,b:2,c:3', ',', ':')",
)