-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
subquery calculated columns not supported as dimensions with sql_mode=only_full_group_by #29616
Comments
Hey @ThChatz! I'm here to help you with any bugs, questions, or contributions you have for the repository. Let's tackle this issue together! To address the issue where selecting a subquery calculated column as a dimension breaks charts in Superset version 4.0.2, you need to handle the Here are the steps to fix this:
This code ensures that all selected columns are included in the |
Bad bot |
I do this all the time and haven't had problem. Can you give more details about this, or provide a reproducible test case using some of the example datasets? |
Probably has to do with only_full_group_by but still the issue is visible with default datasets: the query you get is: while a more compatible query would be |
Bug description
Selecting a subquery calculated column as a dimension breaks charts
How to reproduce the bug
Add a subquery calculated column on a dataset
Try to use it as a dimension
Screenshots/recordings
No response
Superset version
4.0.2
Python version
Not applicable
Node version
Not applicable
Browser
Not applicable
Additional context
Simple fix would be to only use the column alias instead of the entire subquery in the generated SQL query
Checklist
The text was updated successfully, but these errors were encountered: