codyml commented on code in PR #20683:
URL: https://github.com/apache/superset/pull/20683#discussion_r924535326
##########
superset/datasets/commands/samples.py:
##########
@@ -78,3 +116,24 @@ def validate(self) -> None:
security_manager.raise_for_ownership(self._model)
except SupersetSecurityException as ex:
raise DatasetForbiddenError() from ex
+
+ @staticmethod
+ def get_limit_clause(
+ page: Optional[int], per_page: Optional[int]
+ ) -> Dict[str, int]:
+ samples_row_limit = app.config.get("SAMPLES_ROW_LIMIT", 1000)
Review Comment:
I meant that if the user has configured `SAMPLES_ROW_LIMIT` to be something
really low, won't this not return full sets of results? The 1000 limit
fallback makes sense in case the API consumer requests crazy high page sizes
but I'm worried that if the user has set `SAMPLES_ROW_LIMIT` to be something
like 5, this will unexpectedly return pages of 5 results.
--
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]