From 3742f86d166160ca3843872ebecb6f30c51f6085 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 14 Aug 2023 12:12:19 +0200 Subject: Merging upstream version 17.12.0. Signed-off-by: Daniel Baumann --- tests/dialects/test_doris.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/dialects/test_doris.py (limited to 'tests/dialects/test_doris.py') diff --git a/tests/dialects/test_doris.py b/tests/dialects/test_doris.py new file mode 100644 index 0000000..63325a6 --- /dev/null +++ b/tests/dialects/test_doris.py @@ -0,0 +1,20 @@ +from tests.dialects.test_dialect import Validator + + +class TestDoris(Validator): + dialect = "doris" + + def test_identity(self): + 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%')", + }, + ) -- cgit v1.2.3