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 2019/04/14 22:37:22 UTC

[GitHub] [incubator-superset] villebro commented on a change in pull request #7131: Make timestamp expression native SQLAlchemy element

villebro commented on a change in pull request #7131: Make timestamp expression native SQLAlchemy element
URL: https://github.com/apache/incubator-superset/pull/7131#discussion_r275177464
 
 

 ##########
 File path: superset/connectors/sqla/models.py
 ##########
 @@ -140,8 +142,14 @@ def get_time_filter(self, start_dttm, end_dttm):
             l.append(col <= text(self.dttm_sql_literal(end_dttm, is_epoch_in_utc)))
         return and_(*l)
 
-    def get_timestamp_expression(self, time_grain):
-        """Getting the time component of the query"""
+    def get_timestamp_expression(self, time_grain: Optional[str]) \
 
 Review comment:
   Based on the documentation I have found, `Optional[str]` is merely shorthand for `Union[None, str]`. In this case the argument is not optional, but can be either `None` or a `str`. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org