mikebridge commented on code in PR #45099:
URL: https://github.com/apache/superset/pull/45099#discussion_r4226850155


##########
superset/commands/report/execute.py:
##########
@@ -1165,6 +1175,11 @@ def _get_chart_data_request_payload(
 
             if form_data.get("server_pagination"):
                 row_limit = form_data.get("row_limit") or 0

Review Comment:
   Thanks, applied your approach in `4c993e6f97`. A small helper parses the 
saved limit with `max(int(float(...)), 0)` and handles 
`TypeError`/`ValueError`/`OverflowError` before the embedded `SQL_MAX_ROW` 
clamp.
   
   - `"15.0"` now requests 15 rows.
   - `"-5"`, invalid and non-finite values become 0 and so take the capped 
zero-limit path (up to `SQL_MAX_ROW` rows). The chart itself would reject a 
negative limit at schema validation, so this choice is deliberate: an invalid 
saved value gives a bounded table rather than a failed report.
   - Regression cases cover all of these. CSV/XLSX keep their existing export 
limits.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to