You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/10/20 17:50:46 UTC

[GitHub] [superset] hughhhh commented on a change in pull request #17155: fix: preventing sql lab None limit value

hughhhh commented on a change in pull request #17155:
URL: https://github.com/apache/superset/pull/17155#discussion_r733014380



##########
File path: superset/sql_lab.py
##########
@@ -291,6 +287,18 @@ def execute_sql_statement(  # pylint: disable=too-many-arguments,too-many-locals
     return SupersetResultSet(data, cursor_description, db_engine_spec)
 
 
+def apply_limit_if_exists(
+    database: Database, increased_limit: Optional[int], query: Query, sql: str
+) -> str:
+    if query.limit and increased_limit:

Review comment:
       we don't need to check the query.limit since it all already a part of the `increased_limit` logic
   https://github.com/apache/superset/pull/17155/files#diff-a0173518300cdfa4526b24e65fb23e7b77acc76a9b4c5983d581759028b4dbdbR196




-- 
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-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org