mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
chore: Remove legacy SIP-15 interim logic/flags (#18936)
* chore: Remove legacy SIP-15 logic * Update ab9a9d86e695_deprecate_time_range_endpoints.py * Update UPDATING.md * Update UPDATING.md * Update UPDATING.md Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
@@ -242,64 +242,3 @@ FEATURE_FLAGS = {
|
||||
```
|
||||
|
||||
A current list of feature flags can be found in [RESOURCES/FEATURE_FLAGS.md](https://github.com/apache/superset/blob/master/RESOURCES/FEATURE_FLAGS.md).
|
||||
|
||||
### SIP 15
|
||||
|
||||
[Superset Improvement Proposal 15](https://github.com/apache/superset/issues/6360) aims to
|
||||
ensure that time intervals are handled in a consistent and transparent manner for both the Druid and
|
||||
SQLAlchemy connectors.
|
||||
|
||||
Prior to SIP-15 SQLAlchemy used inclusive endpoints however these may behave like exclusive for
|
||||
string columns (due to lexicographical ordering) if no formatting was defined and the column
|
||||
formatting did not conform to an ISO 8601 date-time (refer to the SIP for details).
|
||||
|
||||
To remedy this rather than having to define the date/time format for every non-IS0 8601 date-time
|
||||
column, once can define a default column mapping on a per database level via the `extra` parameter:
|
||||
|
||||
```
|
||||
{
|
||||
"python_date_format_by_column_name": {
|
||||
"ds": "%Y-%m-%d"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**New Deployments**
|
||||
|
||||
All new deployments should enable SIP-15 by setting this value in `superset_config.py`:
|
||||
|
||||
```
|
||||
SIP_15_ENABLED = True
|
||||
|
||||
```
|
||||
|
||||
**Existing Deployments**
|
||||
|
||||
Given that it is not apparent whether the chart creator was aware of the time range inconsistencies
|
||||
(and adjusted the endpoints accordingly) changing the behavior of all charts is overly aggressive.
|
||||
Instead SIP-15 proivides a soft transistion allowing producers (chart owners) to see the impact of
|
||||
the proposed change and adjust their charts accordingly.
|
||||
|
||||
Prior to enabling SIP-15, existing deployments should communicate to their users the impact of the
|
||||
change and define a grace period end date (exclusive of course) after which all charts will conform
|
||||
to the [start, end) interval.
|
||||
|
||||
```python
|
||||
from datetime import date
|
||||
|
||||
SIP_15_ENABLED = True
|
||||
SIP_15_GRACE_PERIOD_END = date(<YYYY>, <MM>, <DD>)
|
||||
```
|
||||
|
||||
To aid with transparency the current endpoint behavior is explicitly called out in the chart time
|
||||
range (post SIP-15 this will be [start, end) for all connectors and databases). One can override the
|
||||
defaults on a per database level via the `extra` parameter.
|
||||
|
||||
```python
|
||||
{
|
||||
"time_range_endpoints": ["inclusive", "inclusive"]
|
||||
}
|
||||
```
|
||||
|
||||
Note in a future release the interim SIP-15 logic will be removed (including the
|
||||
`time_grain_endpoints` form-data field) via a code change and Alembic migration.
|
||||
|
||||
4
docs/static/resources/openapi.json
vendored
4
docs/static/resources/openapi.json
vendored
@@ -683,10 +683,6 @@
|
||||
"nullable": true,
|
||||
"type": "string"
|
||||
},
|
||||
"time_range_endpoints": {
|
||||
"items": {},
|
||||
"type": "array"
|
||||
},
|
||||
"where": {
|
||||
"description": "WHERE clause to be added to queries using AND operator.",
|
||||
"type": "string"
|
||||
|
||||
Reference in New Issue
Block a user