Bug description
We have a dashboard with multiple timestamp columns in a single dataset (e.g., ts_utc
and ts_pst
) and want to let users switch between these columns using the time column filter.
Expected Behavior
When the user selects a different timestamp column (e.g., switching from ts_utc
to ts_pst
), Superset should use that column as the time dimension. We’ve confirmed that the underlying query does indeed switch to ts_pst
.
Actual Behavior
Despite the query showing the correct timestamp column, the chart appears to mix or merge all data together incorrectly, rather than reflecting the new time dimension as expected.
Screenshots/recordings
No response
Superset version
4.1.1
Python version
3.11
Node version
16
Browser
Chrome
Additional context
The "View as Table" view of the chart gives correct output. This suggests that the issue is specific to the chart visualization rather than the underlying data or query.
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] 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.
Comment From: dosubot[bot]
The issue you're experiencing with the time column filter in Superset version 4.1.1, where the chart visualization incorrectly merges data despite the query using the correct timestamp column, could be related to known issues with the chart rendering engine and time column filters. Specifically, there are issues where time range filters do not persist correctly or are not applied as expected in certain views, which might affect the visualization [1].
Additionally, Superset's handling of time columns involves mapping reserved column names to specific query fields, and any misalignment in this process could lead to incorrect data representation in charts [2]. It's also worth noting that there are known bugs related to time grain and time range calculations that might impact the functionality of time filters [3].
Given that the "View as Table" displays the correct data, the problem likely lies within the chart rendering logic. You might want to check if there are any specific configurations or settings in your chart setup that could be causing this issue, such as custom time grain settings or additional filters that might interfere with the time column filter.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
Comment From: rusackas
Relates to (or duplicates?) https://github.com/apache/superset/issues/33725