villebro commented on a change in pull request #13621:
URL: https://github.com/apache/superset/pull/13621#discussion_r594317093
##########
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 know `INT` is at least used in [SQL
Server](https://docs.microsoft.com/en-us/sql/t-sql/data-types/int-bigint-smallint-and-tinyint-transact-sql?view=sql-server-ver15)
and a synonym on
[Snowflake](https://docs.snowflake.com/en/sql-reference/intro-summary-data-types.html),
and I don't know of any commonly used type names that would cause a collision
with the shorter regexes, so I still feel like these should be in the base
engine spec.
----------------------------------------------------------------
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]