summaryrefslogtreecommitdiffstats
path: root/tests/dialects/test_starrocks.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:23:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-08-10 09:23:50 +0000
commit4cc7d5a6dcda8f275b4156a9a23bbe5380be1b53 (patch)
tree1084b1a2dd9f2782031b4aa79608db08968a5837 /tests/dialects/test_starrocks.py
parentReleasing debian version 17.9.1-1. (diff)
downloadsqlglot-4cc7d5a6dcda8f275b4156a9a23bbe5380be1b53.tar.xz
sqlglot-4cc7d5a6dcda8f275b4156a9a23bbe5380be1b53.zip
Merging upstream version 17.11.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_starrocks.py')
-rw-r--r--tests/dialects/test_starrocks.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/dialects/test_starrocks.py b/tests/dialects/test_starrocks.py
index 96e20da..21a89d7 100644
--- a/tests/dialects/test_starrocks.py
+++ b/tests/dialects/test_starrocks.py
@@ -1,7 +1,7 @@
from tests.dialects.test_dialect import Validator
-class TestMySQL(Validator):
+class TestStarrocks(Validator):
dialect = "starrocks"
def test_identity(self):
@@ -10,11 +10,21 @@ class TestMySQL(Validator):
def test_time(self):
self.validate_identity("TIMESTAMP('2022-01-01')")
+ self.validate_identity(
+ "SELECT DATE_DIFF('second', '2010-11-30 23:59:59', '2010-11-30 20:58:59')"
+ )
+ self.validate_identity(
+ "SELECT DATE_DIFF('minute', '2010-11-30 23:59:59', '2010-11-30 20:58:59')"
+ )
def test_regex(self):
self.validate_all(
- "SELECT REGEXP_LIKE(abc, '%foo%')",
- write={
+ "SELECT REGEXP(abc, '%foo%')",
+ read={
+ "mysql": "SELECT REGEXP_LIKE(abc, '%foo%')",
"starrocks": "SELECT REGEXP(abc, '%foo%')",
},
+ write={
+ "mysql": "SELECT REGEXP_LIKE(abc, '%foo%')",
+ },
)