bito-code-review[bot] commented on PR #43148:
URL: https://github.com/apache/superset/pull/43148#issuecomment-5296923000
<!-- Bito Reply -->
The pull request addresses the issue of silent limit overrides in
`get_limit_clause` by removing the hard ceiling that previously capped
`per_page` at `samples_row_limit`. The updated implementation now honors the
requested `per_page` (up to the global `SQL_MAX_ROW` limit via
`apply_max_row_limit`) instead of resetting it to `samples_row_limit` when the
input exceeds that value. This change ensures that pagination semantics remain
consistent with the user's request, as demonstrated by the new regression tests
in `tests/unit_tests/views/datasource/utils_test.py` which verify that
`per_page` values like 5000 or 10000 are now correctly returned in the
`row_limit` field.
**superset/views/datasource/utils.py**
```
if limit < 0:
# reset limit value if input is invalid
limit = samples_row_limit
elif limit:
limit = apply_max_row_limit(limit)
```
--
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]