nikolagigic commented on a change in pull request #13294:
URL: https://github.com/apache/superset/pull/13294#discussion_r592820389
##########
File path: superset/db_engine_specs/base.py
##########
@@ -145,8 +146,87 @@ 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.SmallInteger(),
+ GenericDataType.NUMERIC,
+ ),
+ (
+ re.compile(r"^integer", re.IGNORECASE),
Review comment:
There is an `INTEGEER` type in `mysql` dialect.
##########
File path: superset/db_engine_specs/base.py
##########
@@ -145,8 +146,87 @@ 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.SmallInteger(),
+ GenericDataType.NUMERIC,
+ ),
+ (
+ re.compile(r"^integer", re.IGNORECASE),
Review comment:
There is an `INTEGER` type in `mysql` dialect.
----------------------------------------------------------------
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]