apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.59k stars 13.79k forks source link

Database error when drilling to detail on a bar chart with an X-axis column of type other than datetime #23372

Open sfirke opened 1 year ago

sfirke commented 1 year ago

Pretty specific bug I found when testing 2.1.0 (rc2 is the first time I'm trying out DRILL_TO_DETAIL).

My backend is SQL Server, thus that specific error message.

My guess is that there's an operation to cast an X-axis variable to datetime when charting if that variable is marked as temporal, but this breaks at the drilling?

My workaround: I changed the variable in the database to be datetime and then I could drill successfully. But that's a little misleading since my variable does not have that resolution, this data field is only precise to the date level.

sfirke commented 1 year ago

This can be validated by trying to drill on the year value in my top chat on this dashboard: https://analytics.a2gov.org/superset/dashboard/traffic-crashes/?standalone=2. There the x-axis variable (year) is numeric.

rusackas commented 8 months ago

@sfirke it looks like drilling isn't enabled on that dash/instance. Is anyone able to say if this is still an issue in 3.x now that GENERIC_CHART_AXES is on by default there, or in 4.0 now that the FF is gone?

sfirke commented 8 months ago

@rusackas oops, the public user can't drill on that chart -- but I can. Confirming that this persists in 4.0.0rc1: image

rusackas commented 6 days ago

This one's hitting my stale range... not sure if there are any takers on picking this one up :/