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/11/11 09:04:52 UTC

[GitHub] [superset] aniaan commented on a change in pull request #17048: fix(elasticsearch): time_zone setting does not work for cast datetime expressions

aniaan commented on a change in pull request #17048:
URL: https://github.com/apache/superset/pull/17048#discussion_r747319895



##########
File path: superset/db_engine_specs/base.py
##########
@@ -686,13 +685,14 @@ def df_to_sql(
 
     @classmethod
     def convert_dttm(  # pylint: disable=unused-argument
-        cls, target_type: str, dttm: datetime,
+        cls, target_type: str, dttm: datetime, **kwargs: Any,

Review comment:
       Indeed, the writing here is not strict enough, for `db_extra`, it is better to show the declaration type, I think, the method signature can be like this, `def convert_dttm(cls, target_type: str, dttm: datetime, db_extra: Optional[Dict[str, Any]], **kwargs: Any)` also continue to retain `kwargs`, so that later if a data source needs non-db_extra information, this way is also compatible, what do you think




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