villebro closed pull request #4889: Fix regression in timestamp expression URL: https://github.com/apache/incubator-superset/pull/4889
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: us...@infra.apache.org With regards, Apache Git Services