Revert "fix: the calculated columns explicit type convert into date (#14813)" (#16950)

This reverts commit 6bdbd2bf50.
This commit is contained in:
John Bodley 2021-10-26 17:25:49 -07:00 committed by GitHub
parent 792efefcb4
commit b7e7ef2831
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -338,8 +338,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