Applying `GROUP BY` on `Time-series (Bar) Chart` Omits NULL group values
See original GitHub issueA clear and concise description of what the bug is.
Expected results
Total counts of stacked bar chart should be the same before/after GROUP BY
has been introduced.
Actual results
Total counts of stacked bar chart with GROUP BY
applied are wonky and don’t match those without GROUP BY
applied. It seems likely that this only occurs when using a GROUP BY
on a column where the column’s value could be NULL
.
Steps to recreate:
- Query:
SELECT 'group1' as test, 10 AS count, CURRENT_DATE() AS date
UNION ALL
SELECT NULL as test, 5 AS count, CURRENT_DATE() AS date
UNION ALL
SELECT 'group3' as test, 5 AS count, CURRENT_DATE() AS date
UNION ALL
SELECT 'group4' as test, 5 AS count, CURRENT_DATE() AS date
-
Create Time Series Stacked Bar Chart (ECharts) without GROUP BY
-
Compare with GROUP BY and observe some other weird behavior here where the two stacked colors exclude the 3rd non-null group…
Other Screenshots
Without:
With GROUP BY
:
Environment
Not sure. Using Preset.io latest
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- [] I have checked the issue tracker for the same issue and I haven’t found one similar. - Maybe this one is similar? https://github.com/apache/superset/issues/13850
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
NULL Values and the GROUP BY Clause - LearnSQL.com
In SQL, NULL is a special marker used to indicate that a data value does not exist in the database. For more details,...
Read more >Build a time-series graph in Grafana - Timescale Docs
This creates the long, straight, almost-horizontal lines you see in the graph. To circumvent this issue, you can use Grafana's Connect null values...
Read more >pandas.DataFrame.groupby — pandas 1.5.2 documentation
A groupby operation involves some combination of splitting the object, applying a function, and combining the results. This can be used to group...
Read more >Handling Null and Other Special Values - Tableau Help
The null values will still be included in calculations. The default position depends on the data type. The table below defines the defaults....
Read more >make-series operator - Azure Data Explorer - Microsoft Learn
This AxisColumn array is also the last output column in the output ... The input rows are arranged into groups having the same...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@junlincc 100% agree to show NULLs. They are a valid category group and without them, data becomes skewed. I would prefer if the new ECharts behaved in the same manner as the existing Bar Charts.
It appears that this may have already been fixed?