villebro commented on a change in pull request #10811:
URL: 
https://github.com/apache/incubator-superset/pull/10811#discussion_r484666412



##########
File path: superset/db_engine_specs/mssql.py
##########
@@ -46,7 +46,7 @@ class MssqlEngineSpec(BaseEngineSpec):
         "PT0.5H": "DATEADD(minute, DATEDIFF(minute, 0, {col}) / 30 * 30, 0)",
         "PT1H": "DATEADD(hour, DATEDIFF(hour, 0, {col}), 0)",
         "P1D": "DATEADD(day, DATEDIFF(day, 0, {col}), 0)",
-        "P1W": "DATEADD(week, DATEDIFF(week, 0, {col}), 0)",

Review comment:
       The `P1W` time grain tends to refer to the official weekly date 
truncation, in this case `WEEK`. There are a few time grains that target 
specific weekday starts that can be seen here: 
https://github.com/apache/incubator-superset/blob/master/superset/db_engine_specs/base.py#L94-L95
 . Do you think it would make sense to leave `P1W` unchanged, and add two new 
time grains, specifically `1969-12-28T00:00:00Z/P1W` to also refer to the 
regular `WEEK` interval, and `1969-12-29T00:00:00Z/P1W` to refer to the 
proposed monday starting week definition?




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to