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 2019/02/12 07:23:04 UTC

[GitHub] mistercrunch commented on a change in pull request #6804: [sqllab] only override limit when user does not specify

mistercrunch commented on a change in pull request #6804: [sqllab] only override limit when user does not specify
URL: https://github.com/apache/incubator-superset/pull/6804#discussion_r255828431
 
 

 ##########
 File path: superset/sql_lab.py
 ##########
 @@ -166,10 +165,8 @@ def execute_sql_statement(
         sql = parsed_query.as_create_table(query.tmp_table_name)
         query.select_as_cta_used = True
     if parsed_query.is_select():
-        if SQL_MAX_ROWS and (not query.limit or query.limit > SQL_MAX_ROWS):
-            query.limit = SQL_MAX_ROWS
-        if query.limit:
-            sql = database.apply_limit_to_sql(sql, query.limit)
+        # Enforce the correct limit generated at query creation time in sql_json
+        sql = database.apply_limit_to_sql(sql, query.limit)
 
 Review comment:
   Are we sure that the `SQL_MAX_ROW` configuration is still taken into account and that the user cannot specify above it?
   
   If people want a new "suggested" soft limit that the user can override, I'm supportive, but we still need an environment setting that the user cannot override.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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