You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "giftig (via GitHub)" <gi...@apache.org> on 2024/08/29 13:04:25 UTC
[I] Postgres: Charts with INTERVAL metrics fail to render [superset]
giftig opened a new issue, #30052:
URL: https://github.com/apache/superset/issues/30052
### Bug description
When using an `INTERVAL` type in postgres as a metric, both bar charts and pie charts fail to render with no obvious errors.
For a pie chart, the legend is rendered but nothing else. For a bar chart, the axes and X-axis labels are rendered, but the bars are not drawn.
No errors are reported, either via toast, in the browser console, or in the application logs.
### How to reproduce the bug
1. Write a query against postgres with an `INTERVAL` column in the response
2. Create a bar chart or pie chart from that query
3. Use the `INTERVAL` as a metric, e.g. with `MAX` aggregation
4. Press the button to render the chart
### Screenshots/recordings


### Superset version
4.0.2
### Python version
3.9
### Node version
16
### Browser
Firefox
### Additional context
Rendering the exact same chart but modifying the query to convert the `INTERVAL` into an integer number of milliseconds worked fine.
### Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [X] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Postgres: Charts with INTERVAL metrics fail to render [superset]
Posted by "giftig (via GitHub)" <gi...@apache.org>.
giftig commented on issue #30052:
URL: https://github.com/apache/superset/issues/30052#issuecomment-2822042475
Yeah I don't think anything's been fixed here. I've just tried verifying it by upgrading to `5.0.0-rc2` but had some issues with requirements failing to install when I tried swapping the image tag, so wasn't able to quickly try it again but I can try to reproduce with a fresh db / install when I have some spare time.
I suspect using postgres `INTERVAL` is a less common usecase since more people are using "big data" engines like trino with superset and only some use cases would use `INTERVAL` even among postgres users, so it's a fairly niche bug but a bug nonetheless.
I'd take a look at fixing this one but lately I've only been using superset for a hobby project and I worked around this bug by converting `INTERVAL`s to integers for that, so not sure I'll get the bandwidth very soon.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Postgres: Charts with INTERVAL metrics fail to render [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #30052: Postgres: Charts with INTERVAL metrics fail to render
URL: https://github.com/apache/superset/issues/30052
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Postgres: Charts with INTERVAL metrics fail to render [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #30052:
URL: https://github.com/apache/superset/issues/30052#issuecomment-3145864411
Opened a PR (via AI): https://github.com/apache/superset/pull/34513 - let's see how _that_ plays out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Postgres: Charts with INTERVAL metrics fail to render [superset]
Posted by "giftig (via GitHub)" <gi...@apache.org>.
giftig commented on issue #30052:
URL: https://github.com/apache/superset/issues/30052#issuecomment-2439432490
Note that I've also noticed the INTERVAL type doesn't get sorted correctly in query results in SQL Lab; results just end up sorted alphabetically according to the rendered text. It seems there's just no support for INTERVAL in the engine spec.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Postgres: Charts with INTERVAL metrics fail to render [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #30052:
URL: https://github.com/apache/superset/issues/30052#issuecomment-2819580421
This has been silent for quite a while, but looking at the db engine spec, I'm assuming this is still an issue. I don't have a Postgres connection at the moment to test with, but I'll CC @mistercrunch @betodealmeida @sadpandajoe in case they do.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [I] Postgres: Charts with INTERVAL metrics fail to render [superset]
Posted by "giftig (via GitHub)" <gi...@apache.org>.
giftig commented on issue #30052:
URL: https://github.com/apache/superset/issues/30052#issuecomment-3146348223
I had a look at the PR; it looks like it's _technically_ solved this by coercing it into a number of seconds, but it's not really added interval support, just a workaround. If there's currently no interval support on the frontend for other engines, it might need some thought of how to consistently represent an interval (it should ideally display as something similar to `28 days 16:30:00` like you can see in my screenshot, but that's just the string format postgres provides and we'd want to represent and then format it in a cross-engine way)
Currently you'd be using an interval but just see `2476800` in that field, and it's not at all clear that represents just over a day (or even if it's a number of seconds, milliseconds, days...)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org