diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-24 18:46:54 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-24 18:46:54 +0000 |
commit | 5cb547bdac6f807c3a1bc42faffaceaf726a3e3e (patch) | |
tree | 89287ecd0265188fc3119e9d711017634526a09e /tests/dialects/test_snowflake.py | |
parent | Adding upstream version 16.4.0. (diff) | |
download | sqlglot-5cb547bdac6f807c3a1bc42faffaceaf726a3e3e.tar.xz sqlglot-5cb547bdac6f807c3a1bc42faffaceaf726a3e3e.zip |
Adding upstream version 16.4.2.upstream/16.4.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tests/dialects/test_snowflake.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/dialects/test_snowflake.py b/tests/dialects/test_snowflake.py index 0514149..48bb2f7 100644 --- a/tests/dialects/test_snowflake.py +++ b/tests/dialects/test_snowflake.py @@ -23,19 +23,20 @@ class TestSnowflake(Validator): self.validate_identity("CREATE TABLE foo (bar FLOAT AUTOINCREMENT START 0 INCREMENT 1)") self.validate_identity("ALTER TABLE IF EXISTS foo SET TAG a = 'a', b = 'b', c = 'c'") self.validate_identity("ALTER TABLE foo UNSET TAG a, b, c") + self.validate_identity("COMMENT IF EXISTS ON TABLE foo IS 'bar'") + self.validate_identity("SELECT CONVERT_TIMEZONE('UTC', 'America/Los_Angeles', col)") self.validate_identity( 'COPY INTO NEW_TABLE ("foo", "bar") FROM (SELECT $1, $2, $3, $4 FROM @%old_table)' ) - self.validate_identity("COMMENT IF EXISTS ON TABLE foo IS 'bar'") - self.validate_identity("SELECT CONVERT_TIMEZONE('UTC', 'America/Los_Angeles', col)") + 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)"}) + self.validate_all("CAST(x AS CHARACTER VARYING)", write={"snowflake": "CAST(x AS VARCHAR)"}) + self.validate_all("CAST(x AS NCHAR VARYING)", write={"snowflake": "CAST(x AS VARCHAR)"}) self.validate_all( "SELECT * FROM (VALUES (0) foo(bar))", write={"snowflake": "SELECT * FROM (VALUES (0)) AS foo(bar)"}, ) - self.validate_all("CAST(x AS CHARACTER VARYING)", write={"snowflake": "CAST(x AS VARCHAR)"}) - self.validate_all("CAST(x AS NCHAR VARYING)", write={"snowflake": "CAST(x AS VARCHAR)"}) self.validate_all( "OBJECT_CONSTRUCT(a, b, c, d)", read={ |