-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Description
Bug description
It seem that changes in #26151 broke the UI. Setting SQL_MAX_ROW above 100 000 and trying to go over this limit results in an error in the UI, saying "value cannot exceed 100 000". Setting SQL_MAX_ROW under 100 000 results in the same error regardless of the changes to SQL_MAX_ROW. Meanwhile, when you view the chart's query from inside a dashboard, the LIMIT changes accordingly based on the SQL_MAX_ROW variable. For example, if the SQL_MAX_ROW limit is 500 000 and your chart was created before migrating to 3.1 with the same limit, the UI will not allow you to edit the chart but the LIMIT in the query itself will be set to 500 000. If you change SQL_MAX_ROW to anything below 500 000, the UI will keep the same error but the LIMIT inside the query will be lowered accordingly.
How to reproduce the bug
- Set the SQL_MAX_ROW variable to anything that is different than 100 000.
- Create a chart.
- Set the limit to something above 100 000.
- The UI informs you that the limit is 100 000.
- If you have set SQL_MAX_ROW to < 100 000, set 100 000 as the limit in the UI and create the chart.
- Add the chart to a dashboard.
- View query.
- The LIMIT is equal to SQL_MAX_ROW .
Screenshots/recordings
Limits inside the Docker Container:

Error message:

View query LIMIT:

Superset version
3.1.0
Python version
Not applicable
Node version
Not applicable
Browser
Not applicable
Additional context
One workaround until this is fixed is to export the chart and change the row limit inside the YAML, then import the chart. I tried changing the ROW_LIMIT variable as well, but it did not solve the issue.
Checklist
- I have searched Superset docs and Slack and didn't find a solution to my problem.
- I have searched the GitHub issue tracker and didn't find a similar bug report.
- 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.