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/09/06 06:17:02 UTC

[GitHub] [incubator-superset] mistercrunch commented on a change in pull request #8165: [bugfix] fix timegrain addon regression

mistercrunch commented on a change in pull request #8165: [bugfix] fix timegrain addon regression
URL: https://github.com/apache/incubator-superset/pull/8165#discussion_r321589078
 
 

 ##########
 File path: superset/db_engine_specs/base.py
 ##########
 @@ -161,7 +138,7 @@ def get_timestamp_expr(
         :return: TimestampExpression object
         """
         if time_grain:
-            time_expr = cls.time_grain_functions.get(time_grain)
+            time_expr = cls.get_time_grain_functions().get(time_grain)
 
 Review comment:
   [optional] we may want to materialize the result of `get_time_grain_functions()` instead of re-computing it every time. This being a static class (all @classmethods) it's a bit funky to do (no constructor). Maybe the `@memoize` decorator we have around somewhere would work.
   
   May be overkill as this method may not be called much...

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