Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sfirke opened this issue Mar 14, 2023 · 4 comments
Labels
#bug Bug report dashboard:drill-to-detail validation:validated A committer has validated / submitted the issue or it was reported by multiple users

Comments

@sfirke
Copy link
Member

sfirke commented Mar 14, 2023

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

  • Version 2.1.0rc2 (edit: persists in 4.0.0rc1)
  • GENERIC_CHART_AXES and DRILL_TO_DETAIL flags enabled
  • Bar chart v2
  • X-axis variable is of type varchar or date that has been set to temporal in the Edit Dataset UI
  • Trying to drill to detail by the x-axis variable or "All" results in error message Arithmetic overflow error converting expression to data type datetime

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
Copy link
Member Author

sfirke commented Aug 28, 2023

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
Copy link
Member

rusackas commented Mar 8, 2024

@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
Copy link
Member Author

sfirke commented Mar 8, 2024

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

@sfirke sfirke added the validation:validated A committer has validated / submitted the issue or it was reported by multiple users label Mar 8, 2024
@rusackas
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report dashboard:drill-to-detail validation:validated A committer has validated / submitted the issue or it was reported by multiple users
Projects
None yet
Development

No branches or pull requests

2 participants