Open
Description
Bug description
When using native filters with cascading dependencies in Apache Superset, clearing all filters using the "Clear All Filters" button causes the required time range filter (e.g., "Last week"
) to be set to No filter
.
Because this time filter is marked as non-optional (enableEmptyFilter: false
), and other filters depend on it via cascadeParentIds
, this results in a backend query error when rendering dependent filters:
Error: INVALID_CAST_ARGUMENT: Value cannot be cast to timestamp: None
Steps to reproduce
- Create a native time filter (type Time range) and mark it as required.
- Add default value, 'Last Week'
- Create dependent value filters from dataset that reference this time filter in 'Values are dependent on other filters'.
- Go to the dashboard view, ensure filters are working as expected.
- Click "Clear All Filters".
- Observe that:
- The time filter is cleared to No filter, even though it's marked as required.
- Downstream filters immediately error with an invalid cast exception.
- Expected behavior: the time filter should reset to its default value (defaultDataMask) instead of clearing entirely.
Screenshots/recordings
Superset version
4.0.2
Python version
Not applicable
Node version
I don't know
Browser
Not applicable
Additional context
No response
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.