diff --git a/superset/db_engine_specs/presto.py b/superset/db_engine_specs/presto.py index 5570e1d539..071fd885f8 100644 --- a/superset/db_engine_specs/presto.py +++ b/superset/db_engine_specs/presto.py @@ -353,8 +353,8 @@ class PrestoEngineSpec(BaseEngineSpec): # pylint: disable=too-many-public-metho (re.compile(r"^varbinary.*", re.IGNORECASE), types.VARBINARY()), (re.compile(r"^json.*", re.IGNORECASE), types.JSON()), (re.compile(r"^date.*", re.IGNORECASE), types.DATE()), - (re.compile(r"^time.*", re.IGNORECASE), types.Time()), (re.compile(r"^timestamp.*", re.IGNORECASE), types.TIMESTAMP()), + (re.compile(r"^time.*", re.IGNORECASE), types.Time()), (re.compile(r"^interval.*", re.IGNORECASE), Interval()), (re.compile(r"^array.*", re.IGNORECASE), Array()), (re.compile(r"^map.*", re.IGNORECASE), Map()), diff --git a/tests/db_engine_specs/presto_tests.py b/tests/db_engine_specs/presto_tests.py index 9b2024dd72..d0343a32d7 100644 --- a/tests/db_engine_specs/presto_tests.py +++ b/tests/db_engine_specs/presto_tests.py @@ -554,6 +554,12 @@ class TestPrestoDbEngineSpec(TestDbEngineSpec): sqla_type = PrestoEngineSpec.get_sqla_column_type("integer") assert isinstance(sqla_type, types.Integer) + sqla_type = PrestoEngineSpec.get_sqla_column_type("time") + assert isinstance(sqla_type, types.Time) + + sqla_type = PrestoEngineSpec.get_sqla_column_type("timestamp") + assert isinstance(sqla_type, types.TIMESTAMP) + sqla_type = PrestoEngineSpec.get_sqla_column_type(None) assert sqla_type is None