You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2021/08/17 12:46:26 UTC
[superset] branch master updated: fix(sqlite): week grain refer to
day of week (#16293)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 5e75baf fix(sqlite): week grain refer to day of week (#16293)
5e75baf is described below
commit 5e75baf0cc730154fac0ea80338788c471b506ce
Author: Ville Brofeldt <33...@users.noreply.github.com>
AuthorDate: Tue Aug 17 15:45:08 2021 +0300
fix(sqlite): week grain refer to day of week (#16293)
---
superset/db_engine_specs/sqlite.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/db_engine_specs/sqlite.py b/superset/db_engine_specs/sqlite.py
index cf2f0f9..9a4986b 100644
--- a/superset/db_engine_specs/sqlite.py
+++ b/superset/db_engine_specs/sqlite.py
@@ -44,7 +44,7 @@ class SqliteEngineSpec(BaseEngineSpec):
"PT1M": "DATETIME(STRFTIME('%Y-%m-%dT%H:%M:00', {col}))",
"PT1H": "DATETIME(STRFTIME('%Y-%m-%dT%H:00:00', {col}))",
"P1D": "DATE({col})",
- "P1W": "DATE({col}, -strftime('%W', {col}) || ' days')",
+ "P1W": "DATE({col}, -strftime('%w', {col}) || ' days')",
"P1M": "DATE({col}, -strftime('%d', {col}) || ' days', '+1 day')",
"P0.25Y": (
"DATETIME(STRFTIME('%Y-', {col}) || " # year