mistercrunch closed pull request #4831: db_engine_specs: use correct sqlite 
week time grain
URL: https://github.com/apache/incubator-superset/pull/4831
 
 
   

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/db_engine_specs.py b/superset/db_engine_specs.py
index d239f899a8..0c7444c3f0 100644
--- a/superset/db_engine_specs.py
+++ b/superset/db_engine_specs.py
@@ -424,7 +424,7 @@ class SqliteEngineSpec(BaseEngineSpec):
               'PT1H'),
         Grain('day', _('day'), 'DATE({col})', 'P1D'),
         Grain('week', _('week'),
-              "DATE({col}, -strftime('%w', {col}) || ' days')",
+              "DATE({col}, -strftime('%W', {col}) || ' days')",
               'P1W'),
         Grain('month', _('month'),
               "DATE({col}, -strftime('%d', {col}) || ' days', '+1 day')",


 

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

Reply via email to