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



##########
File path: superset/db_engine_specs/base.py
##########
@@ -145,8 +146,80 @@ class BaseEngineSpec:  # pylint: 
disable=too-many-public-methods
     _date_trunc_functions: Dict[str, str] = {}
     _time_grain_expressions: Dict[Optional[str], str] = {}
     column_type_mappings: Tuple[
-        Tuple[Pattern[str], Union[TypeEngine, Callable[[Match[str]], 
TypeEngine]]], ...,
-    ] = ()
+        Tuple[
+            Pattern[str],
+            Union[TypeEngine, Callable[[Match[str]], TypeEngine]],
+            GenericDataType,
+        ],
+        ...,
+    ] = (
+        (
+            re.compile(r"^smallint", re.IGNORECASE),
+            types.SMALLINT,

Review comment:
       These should be instantiated: `types.SMALLINT()` instead of 
`types.SMALLINT`, otherwise the callback logic later on won't work where we 
check if the type is `callable` (see how Presto implements `VARCHAR`).




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