rebenitez1802 commented on code in PR #45858:
URL: https://github.com/apache/superset/pull/45858#discussion_r4427829281
##########
superset/db_engine_specs/oracle.py:
##########
@@ -190,7 +190,7 @@ def get_column_types(
TimeGrain.MINUTE: "TRUNC(CAST({col} as DATE), 'MI')",
TimeGrain.HOUR: "TRUNC(CAST({col} as DATE), 'HH')",
TimeGrain.DAY: "TRUNC(CAST({col} as DATE), 'DDD')",
- TimeGrain.WEEK: "TRUNC(CAST({col} as DATE), 'WW')",
+ TimeGrain.WEEK: "TRUNC(CAST({col} as DATE), 'IW')",
Review Comment:
🟡 Medium: add an `UPDATING.md` note for the Week regrouping (non-blocking)
This changes how existing Oracle and Impala Week-grain charts are bucketed.
Week starts can move by up to 6 days, the 1–2 day stub at year end disappears,
and per-bucket totals change. The query cache key doesn't include the generated
SQL, so results cached under `'WW'` keep being served until their TTL expires.
The Db2 week-grain change (#43236) documented the same kind of shift in
`UPDATING.md`.
`UPDATING.md` isn't part of this diff, so GitHub can't offer an applyable
suggestion there. Here is an entry for the `## Next` section:
```markdown
- The `Week` time grain for Oracle (`TRUNC(..., 'IW')`) and Impala
(`TRUNC(..., 'D')`) now always truncates to Monday. Previously `'WW'`
aligned weeks to the weekday of January 1, so the week start changed every
year and each year ended with a 1–2 day stub week. Existing Week-grain
charts
on these engines will regroup, and cached results may show the old buckets
until they expire.
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]