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 2021/03/15 12:44:07 UTC
[GitHub] [superset] nikolagigic commented on a change in pull request #13621: fix(explore): Add postgres int and bool regex pattern
nikolagigic commented on a change in pull request #13621:
URL: https://github.com/apache/superset/pull/13621#discussion_r594301868
##########
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:
This is specific to **Postgres Dialect** https://github.com/apache/superset/pull/13621/files#diff-8cec2642bdfebf02492bfb132c78133c229f409661a4e56c8ea96868a1afd63fR37
so keeping them separate like this might be better idea unless you think it's not needed?
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org