mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
fix: the calculated columns explicit type convert into date (#14813)
This commit is contained in:
parent
3224e75193
commit
6bdbd2bf50
@ -309,7 +309,8 @@ class TableColumn(Model, BaseColumn):
|
|||||||
],
|
],
|
||||||
) -> str:
|
) -> str:
|
||||||
"""Convert datetime object to a SQL expression string"""
|
"""Convert datetime object to a SQL expression string"""
|
||||||
sql = self.db_engine_spec.convert_dttm(self.type, dttm) if self.type else None
|
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
|
||||||
|
|
||||||
if sql:
|
if sql:
|
||||||
return sql
|
return sql
|
||||||
|
Loading…
Reference in New Issue
Block a user