1
0
Fork 0
sqlglot/tests/dialects/test_doris.py
Daniel Baumann ab14e550ff
Adding upstream version 18.2.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-13 20:56:33 +01:00

21 lines
618 B
Python

from tests.dialects.test_dialect import Validator
class TestDoris(Validator):
dialect = "doris"
def test_identity(self):
self.validate_identity("COALECSE(a, b, c, d)")
self.validate_identity("SELECT CAST(`a`.`b` AS INT) FROM foo")
self.validate_identity("SELECT APPROX_COUNT_DISTINCT(a) FROM x")
def test_time(self):
self.validate_identity("TIMESTAMP('2022-01-01')")
def test_regex(self):
self.validate_all(
"SELECT REGEXP_LIKE(abc, '%foo%')",
write={
"doris": "SELECT REGEXP(abc, '%foo%')",
},
)