superset icon indicating copy to clipboard operation
superset copied to clipboard

Columns with NULL data throw "Unexpected Error" in Table View Chart

Open DavidJHassan opened this issue 8 years ago • 12 comments

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

  1. Create a table view with a data set that has a column that contains some data and the rest NULL.
  2. Select column with NULL data in NOT GROUPED BY section.
  3. 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".

DavidJHassan avatar Jul 05 '18 20:07 DavidJHassan

We experience this on 0.26.0 aswell. I can see that the CSV export work as expected

calve avatar Jul 24 '18 13:07 calve

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

calve avatar Jul 24 '18 14:07 calve

My backend is MS SQL Server. Could be a db issue.

DavidJHassan avatar Jul 27 '18 03:07 DavidJHassan

The same problem appears with PostgreSQL backend

aladyeva-bmc avatar Jul 27 '18 09:07 aladyeva-bmc

Could not reproduce in master, so this seems to be resolved.

villebro avatar Jul 28 '18 10:07 villebro

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 avatar Jul 28 '18 10:07 villebro

@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 avatar Aug 09 '18 03:08 yamyamyuo

@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.

villebro avatar Aug 09 '18 05:08 villebro

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.

villebro avatar Aug 09 '18 13:08 villebro

The weird behaviour was caused by some tweaking I had done, aka I am still unable to replicate this in master branch.

villebro avatar Aug 11 '18 05:08 villebro

@villebro this can be reporduced in release 0.26.2 version

yamyamyuo avatar Aug 12 '18 12:08 yamyamyuo

This has been resolved in later versions.

DavidJHassan avatar Jan 20 '19 19:01 DavidJHassan