diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 05:12:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 05:12:38 +0000 |
commit | 613c2506f59fefeb0c0b921ca361c65e99458139 (patch) | |
tree | e1207c41ee9b35d77f1608e87e568fe60d701cf6 /tests/dialects/test_mysql.py | |
parent | Adding upstream version 18.17.0. (diff) | |
download | sqlglot-613c2506f59fefeb0c0b921ca361c65e99458139.tar.xz sqlglot-613c2506f59fefeb0c0b921ca361c65e99458139.zip |
Adding upstream version 19.0.1.upstream/19.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dialects/test_mysql.py')
-rw-r--r-- | tests/dialects/test_mysql.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/dialects/test_mysql.py b/tests/dialects/test_mysql.py index dce2b9d..3c165a3 100644 --- a/tests/dialects/test_mysql.py +++ b/tests/dialects/test_mysql.py @@ -564,9 +564,23 @@ class TestMySQL(Validator): "STR_TO_DATE(x, '%M')", read={"": "TS_OR_DS_TO_DATE(x, '%B')"}, ) + self.validate_all( + "STR_TO_DATE(x, '%Y-%m-%d')", + write={"presto": "CAST(DATE_PARSE(x, '%Y-%m-%d') AS DATE)"}, + ) + self.validate_all( + "STR_TO_DATE(x, '%Y-%m-%dT%T')", write={"presto": "DATE_PARSE(x, '%Y-%m-%dT%T')"} + ) def test_mysql(self): self.validate_all( + # MySQL doesn't support FULL OUTER joins + "SELECT * FROM t1 LEFT OUTER JOIN t2 ON t1.x = t2.x UNION SELECT * FROM t1 RIGHT OUTER JOIN t2 ON t1.x = t2.x", + read={ + "postgres": "SELECT * FROM t1 FULL OUTER JOIN t2 ON t1.x = t2.x", + }, + ) + self.validate_all( "a XOR b", read={ "mysql": "a XOR b", |