mdesmet commented on code in PR #21737:
URL: https://github.com/apache/superset/pull/21737#discussion_r993542026
##########
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:
Indeed, my mistake!
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]