feat: support mulitple temporal filters in AdhocFilter and move the Time Section away (#21767)

This commit is contained in:
Yongjie Zhao
2022-11-02 08:21:17 +08:00
committed by GitHub
parent 25be9ab4bc
commit a9b229dd1d
59 changed files with 1276 additions and 237 deletions

View File

@@ -77,7 +77,11 @@ class SqliteEngineSpec(BaseEngineSpec):
cls, target_type: str, dttm: datetime, db_extra: Optional[Dict[str, Any]] = None
) -> Optional[str]:
tt = target_type.upper()
if tt in (utils.TemporalType.TEXT, utils.TemporalType.DATETIME):
if tt in (
utils.TemporalType.TEXT,
utils.TemporalType.DATETIME,
utils.TemporalType.TIMESTAMP,
):
return f"""'{dttm.isoformat(sep=" ", timespec="seconds")}'"""
return None