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_snowflake.py | |
parent | Adding upstream version 18.17.0. (diff) | |
download | sqlglot-upstream/19.0.1.tar.xz sqlglot-upstream/19.0.1.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_snowflake.py')
-rw-r--r-- | tests/dialects/test_snowflake.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/dialects/test_snowflake.py b/tests/dialects/test_snowflake.py index 65b77ea..2cad1d2 100644 --- a/tests/dialects/test_snowflake.py +++ b/tests/dialects/test_snowflake.py @@ -13,6 +13,7 @@ class TestSnowflake(Validator): expr.selects[0].assert_is(exp.AggFunc) self.assertEqual(expr.sql(dialect="snowflake"), "SELECT APPROX_TOP_K(C4, 3, 5) FROM t") + self.validate_identity("SELECT OBJECT_CONSTRUCT()") self.validate_identity("SELECT DAYOFMONTH(CURRENT_TIMESTAMP())") self.validate_identity("SELECT DAYOFYEAR(CURRENT_TIMESTAMP())") self.validate_identity("LISTAGG(data['some_field'], ',')") @@ -77,6 +78,10 @@ class TestSnowflake(Validator): "SELECT {fn CEILING(5.3)}", "SELECT CEIL(5.3)", ) + self.validate_identity( + "SELECT TO_TIMESTAMP(x) FROM t", + "SELECT CAST(x AS TIMESTAMPNTZ) FROM t", + ) self.validate_all("CAST(x AS BYTEINT)", write={"snowflake": "CAST(x AS INT)"}) self.validate_all("CAST(x AS CHAR VARYING)", write={"snowflake": "CAST(x AS VARCHAR)"}) |