Columns with NULL data throw "Unexpected Error" in Table View Chart
Make sure these boxes are checked before submitting your issue - thank you!
- [X] I have checked the superset logs for python stacktraces and included it here as text if any
- [x] I have reproduced the issue with at least the latest released version of superset
- [X] I have checked the issue tracker for the same issue and I haven't found one similar
Superset version
0.26.3
Expected results
Table View chart to load when column data contains NULL's. In previous versions it would display NULL's as 0's.
Actual results
Unexpected Error is thrown and subsequently the table did not load.
Steps to reproduce
- Create a table view with a data set that has a column that contains some data and the rest NULL.
- Select column with NULL data in NOT GROUPED BY section.
- Run Query and see "Unexpected Error"
It seems this problem only exists with multiple rows of a column containing NULL data. I can load one row with NULL data in columns. As soon as I load more rows I get "Unexpected Error".
We experience this on 0.26.0 aswell. I can see that the CSV export work as expected
I failed to reproduce the behaviour by setting NULL values to the embedded superset.db sqlite database, so maybe this as to do with the database engine ? All of my affected backend are postgreql
My backend is MS SQL Server. Could be a db issue.
The same problem appears with PostgreSQL backend
Could not reproduce in master, so this seems to be resolved.
Correction: I was able to reproduce on master, the PR that fixes this has not yet been merged (the handle_nulls() error in #5487 ).
@villebro Same problems here. It seems the frontend could not handle NULL value. We use Presto as the query engine, does this #5487 also covers the presto's return data?
@yamyamyuo Yes, the handle_nulls() fix covers all engines. I am unable to reproduce this bug in master branch, were you able to test #5487 and are you still seeing the issue? If you able to produce a simple query along the lines of select 1 as a, null as b union all select 1 as a, 2 as b that can reproduce the error that would be most helpful in debugging.
Not sure it's related, but I'm getting weird behavior in NOT GROUPED BY tables, for some cases it seems to be dropping off the last column from the table even though it's available in the query result. Will investigate.
The weird behaviour was caused by some tweaking I had done, aka I am still unable to replicate this in master branch.
@villebro this can be reporduced in release 0.26.2 version
This has been resolved in later versions.