Antonio-RiveroMartnez commented on code in PR #33357: URL: https://github.com/apache/superset/pull/33357#discussion_r2079160787
########## superset/utils/core.py: ########## @@ -1741,24 +1741,29 @@ def parse_boolean_string(bool_str: str | None) -> bool: def apply_max_row_limit( limit: int, - max_limit: int | None = None, + server_pagination: bool = False, Review Comment: could this allow None too? so we're not forced to provide it ########## superset/common/query_object_factory.py: ########## @@ -96,14 +102,27 @@ def _process_extras( return extras def _process_row_limit( - self, row_limit: int | None, result_type: ChartDataResultType + self, + row_limit: int | None, + result_type: ChartDataResultType, + server_pagination: bool = False, Review Comment: Could this be None too? ########## superset/utils/core.py: ########## @@ -1741,24 +1741,29 @@ def parse_boolean_string(bool_str: str | None) -> bool: def apply_max_row_limit( limit: int, - max_limit: int | None = None, Review Comment: Does this mean this method is now ignoring a custom `max_limit` and instead using the config max limits? because that's it not what it was doing before, meaning, this could be a braking change ########## superset/utils/core.py: ########## @@ -1741,24 +1741,29 @@ def parse_boolean_string(bool_str: str | None) -> bool: def apply_max_row_limit( limit: int, - max_limit: int | None = None, + server_pagination: bool = False, ) -> int: """ - Override row limit if max global limit is defined + Override row limit based on server pagination setting :param limit: requested row limit - :param max_limit: Maximum allowed row limit + :param server_pagination: whether server-side pagination is enabled :return: Capped row limit - >>> apply_max_row_limit(100000, 10) - 10 - >>> apply_max_row_limit(10, 100000) - 10 - >>> apply_max_row_limit(0, 10000) - 10000 - """ - if max_limit is None: Review Comment: We used to use the config values only if no max_limit was provided, why the change to always using the configs now? -- 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: notifications-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org