diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-19 10:22:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-03-19 10:22:04 +0000 |
commit | 57c3067868d0a1da90ec0f2201dd91f031241274 (patch) | |
tree | 3b16819683e27ccbc7e7726675ab8d3e978fc8aa /tests/dialects/test_sqlite.py | |
parent | Adding upstream version 11.3.6. (diff) | |
download | sqlglot-57c3067868d0a1da90ec0f2201dd91f031241274.tar.xz sqlglot-57c3067868d0a1da90ec0f2201dd91f031241274.zip |
Adding upstream version 11.4.1.upstream/11.4.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/dialects/test_sqlite.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/dialects/test_sqlite.py b/tests/dialects/test_sqlite.py index f889445..98c4a79 100644 --- a/tests/dialects/test_sqlite.py +++ b/tests/dialects/test_sqlite.py @@ -57,6 +57,33 @@ class TestSQLite(Validator): def test_sqlite(self): self.validate_all( + "CURRENT_DATE", + read={ + "": "CURRENT_DATE", + "snowflake": "CURRENT_DATE()", + }, + ) + self.validate_all( + "CURRENT_TIME", + read={ + "": "CURRENT_TIME", + "snowflake": "CURRENT_TIME()", + }, + ) + self.validate_all( + "CURRENT_TIMESTAMP", + read={ + "": "CURRENT_TIMESTAMP", + "snowflake": "CURRENT_TIMESTAMP()", + }, + ) + self.validate_all( + "SELECT DATE('2020-01-01 16:03:05')", + read={ + "snowflake": "SELECT CAST('2020-01-01 16:03:05' AS DATE)", + }, + ) + self.validate_all( "SELECT CAST([a].[b] AS SMALLINT) FROM foo", write={ "sqlite": 'SELECT CAST("a"."b" AS INTEGER) FROM foo', |