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/10/18 16:47:06 UTC

[GitHub] [superset] oscarostlundgs commented on issue #17143: Presto engine spec broken - Date column mapped to Datetime

oscarostlundgs commented on issue #17143:
URL: https://github.com/apache/superset/issues/17143#issuecomment-945965410


   Tried the following patch and it solves this particular issue. Date columns in Presto are mapped to DATE columns in SQLAlchemy. 
   
   
   ```
   --- presto.py	2021-10-18 11:28:52.466574000 -0400
   +++ presto-patched.py	2021-10-18 11:32:53.766105000 -0400
   @@ -508,7 +508,7 @@
            ),
            (
                re.compile(r"^date.*", re.IGNORECASE),
   -            types.DATETIME(),
   +            types.DATE(),
                utils.GenericDataType.TEMPORAL,
            ),
            (
   ```
   
   @villebro, I see this being changed as part of [this PR](https://github.com/apache/superset/pull/16634). 
   If you want to retain the DATETIME columns, another alternative would be to update the `convert_dttm` function to support DATETIME. 
   
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

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