diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-14 10:12:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-08-14 10:12:19 +0000 |
commit | 3742f86d166160ca3843872ebecb6f30c51f6085 (patch) | |
tree | 6d747c3e7082fc2bae56053930813d5625e9b3d8 /tests/dialects/test_doris.py | |
parent | Releasing debian version 17.11.0-1. (diff) | |
download | sqlglot-3742f86d166160ca3843872ebecb6f30c51f6085.tar.xz sqlglot-3742f86d166160ca3843872ebecb6f30c51f6085.zip |
Merging upstream version 17.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_doris.py')
-rw-r--r-- | tests/dialects/test_doris.py | 20 |
1 files changed, 20 insertions, 0 deletions
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%')", + }, + ) |