You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/10/12 13:18:28 UTC
[GitHub] [superset] hashhar commented on a diff in pull request #21737: fix(trino): Fix Trino timestamp conversion
hashhar commented on code in PR #21737:
URL: https://github.com/apache/superset/pull/21737#discussion_r993450615
##########
tests/integration_tests/db_engine_specs/trino_tests.py:
##########
@@ -166,3 +168,31 @@ def test_auth_custom_auth_denied(self):
f"For security reason, custom authentication '{auth_method}' "
f"must be listed in 'ALLOWED_EXTRA_AUTHENTICATIONS' config"
)
+
+ def test_convert_dttm(self):
+ dttm = self.get_dttm()
+
+ self.assertEqual(
+ TrinoEngineSpec.convert_dttm("TIMESTAMP", dttm),
+ "TIMESTAMP '2019-01-02 03:04:05.678900'",
+ )
+
+ self.assertEqual(
+ TrinoEngineSpec.convert_dttm("TIMESTAMP(3)", dttm),
+ "TIMESTAMP '2019-01-02 03:04:05.678900'",
+ )
+
+ self.assertEqual(
+ TrinoEngineSpec.convert_dttm("TIMESTAMP WITH TIME ZONE", dttm),
+ "TIMESTAMP '2019-01-02 03:04:05.678900'",
+ )
+
+ self.assertEqual(
+ TrinoEngineSpec.convert_dttm("TIMESTAMP WITH TIME ZONE", dttm),
+ "TIMESTAMP '2019-01-02 03:04:05.678900'",
+ )
Review Comment:
did you mean to use `TIMESTAMP(3) WITH TIME ZONE` here instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org