This patch disables Superset’s built-in time_range filter whenever Jinja templates
{{ from_dttm }} or {{ to_dttm }} appear in any of the following:
- Dataset SQL
- Calculated metrics
- Adhoc filters
As a result, no automatic date filter is applied when those templates are used.
- Template detection via regex in
query_context_processor.py - Flag injection: adds
disable_auto_time_filterto queryextras - Filter skip:
helpers.pyomits theTEMPORAL_RANGElogic when flagged
query_context_processor.py – Detecting template usage and injecting a disable_auto_time_filter flag into the query’s extras. https://github.com/apache/superset/blob/4.1.2rc1/superset/common/query_context_processor.py#L225
helpers.py – Skipping the temporal‐range filter logic if that flag is present. https://github.com/apache/superset/blob/4.1.2rc1/superset/models/helpers.py#L1897
supserset 4.1.2rc