You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by GitBox <gi...@apache.org> on 2018/04/27 01:02:46 UTC

[GitHub] mistercrunch closed pull request #4892: Fix time grain

mistercrunch closed pull request #4892: Fix time grain
URL: https://github.com/apache/incubator-superset/pull/4892
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index c65df0209a..83fe3971c6 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -131,7 +131,7 @@ def get_timestamp_expression(self, time_grain):
                     expr = db_spec.epoch_ms_to_dttm().format(col=expr)
             grain = self.table.database.grains_dict().get(time_grain)
             literal = grain.function if grain else '{col}'
-            literal = expr.format(col=expr)
+            literal = literal.format(col=expr)
         return literal_column(literal, type_=DateTime).label(DTTM_ALIAS)
 
     @classmethod


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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