betodealmeida commented on a change in pull request #13521:
URL: https://github.com/apache/superset/pull/13521#discussion_r614405272
##########
File path: superset/views/core.py
##########
@@ -2566,6 +2579,12 @@ def sql_json_exec( # pylint:
disable=too-many-statements,too-many-locals
if not (config.get("SQLLAB_CTAS_NO_LIMIT") and select_as_cta):
# set LIMIT after template processing
limits = [mydb.db_engine_spec.get_limit_from_sql(rendered_query),
limit]
+ if limits[0] == limits[1]:
+ query.limiting_factor = LimitingFactor.QUERY_AND_DROPDOWN
+ elif limits[0] > limits[1]:
+ query.limiting_factor = LimitingFactor.DROPDOWN
+ else:
+ query.limiting_factor = LimitingFactor.QUERY
Review comment:
> This logic makes sense. In your second set of code, how would we
identify something that was not limited in it?
The default is `UNKNOWN`, no?
--
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]