betodealmeida commented on a change in pull request #13521:
URL: https://github.com/apache/superset/pull/13521#discussion_r589843313



##########
File path: superset/sql_lab.py
##########
@@ -206,7 +206,8 @@ def execute_sql_statement(
         if SQL_MAX_ROW and (not query.limit or query.limit > SQL_MAX_ROW):
             query.limit = SQL_MAX_ROW
         if query.limit:
-            sql = database.apply_limit_to_sql(sql, query.limit)
+            #We are fetching one more than the requested limit in order to 
test whether there are more rows than the limit. 

Review comment:
       You'll need to split this into multiple lines to make the linter happy. 
I recommend adding a comment that later we'll drop the extra row:
   
   ```suggestion
               # We are fetching one more than the requested limit in order to 
test whether there are more rows than the limit. Later, the extra row will be 
dropped before sending the results back to the user.
   ```




----------------------------------------------------------------
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.

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