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



##########
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:
       With "official weekly date truncation" I was referring to what the 
database by default means by `WEEK`, which can mean different things for 
different databases. Personally, I tend to use the weekly grain to see what 7 
day aggregates are; I usually don't so much care if it's a week starting on 
Sunday or Monday. For the use case where this is important, I suggest using the 
dedicated time grains where supported. Going forward, I do agree it would be 
great to start introducing more consistency in what these terms mean, and we 
encourage and gladly accept contributions to that end.




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