This is an automated email from the ASF dual-hosted git repository. johnbodley pushed a commit to branch revert-14813-explicit_cast in repository https://gitbox.apache.org/repos/asf/superset.git
commit 12ef0165eb21611fc8f7a5bba25e4e97380d7839 Author: John Bodley <[email protected]> AuthorDate: Sun Oct 3 19:38:12 2021 -0700 Revert "fix: the calculated columns explicit type convert into date (#14813)" This reverts commit 6bdbd2bf5059dac58e65cdf3fbafe618e182d907. --- superset/connectors/sqla/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index a27a4a1..feca18b 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -334,8 +334,7 @@ class TableColumn(Model, BaseColumn, CertificationMixin): ], ) -> str: """Convert datetime object to a SQL expression string""" - dttm_type = self.type or ("DATETIME" if self.is_dttm else None) - sql = self.db_engine_spec.convert_dttm(dttm_type, dttm) if dttm_type else None + sql = self.db_engine_spec.convert_dttm(self.type, dttm) if self.type else None if sql: return sql
