villebro commented on a change in pull request #13621:
URL: https://github.com/apache/superset/pull/13621#discussion_r594298963



##########
File path: superset/db_engine_specs/postgres.py
##########
@@ -92,6 +99,16 @@ class PostgresEngineSpec(PostgresBaseEngineSpec):
     try_remove_schema_from_table_name = False
 
     column_type_mappings = (
+        (
+            re.compile(r"^int.*", re.IGNORECASE),
+            INTEGER(),
+            utils.GenericDataType.NUMERIC,
+        ),
+        (
+            re.compile(r"^bool.*", re.IGNORECASE),
+            BOOLEAN(),
+            utils.GenericDataType.BOOLEAN,
+        ),

Review comment:
       I think these should be put in `BaseEngineSpec` (to replace `integer` 
and `boolean` respectively), as they're both fairly commonly used type names.

##########
File path: tests/db_engine_specs/crate_tests.py
##########
@@ -26,7 +26,7 @@ def test_convert_dttm(self):
         DB Eng Specs (crate): Test conversion to date time
         """
         dttm = self.get_dttm()
-        assert CrateEngineSpec.convert_dttm("TIMESTAMP", dttm) == 
"1546398245678.9"
+        assert CrateEngineSpec.convert_dttm("TIMESTAMP", dttm) == 
"1546394645678.9"

Review comment:
       This needs to be changed back to UTC (I need to look into how to make 
this always render the timestamp as UTC despite local timezone).




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to