AAfghahi commented on code in PR #20283:
URL: https://github.com/apache/superset/pull/20283#discussion_r890529064


##########
superset/sqllab/sqllab_execution_context.py:
##########
@@ -76,7 +76,7 @@ def _init_from_query_params(self, query_params: Dict[str, 
Any]) -> None:
         self.sql = cast(str, query_params.get("sql"))
         self.template_params = self._get_template_params(query_params)
         self.async_flag = cast(bool, query_params.get("runAsync"))
-        self.limit = self._get_limit_param(query_params)
+        self.limit = self._get_limit_param(self.sql, query_params)

Review Comment:
   The reason query_params only has access to queryLimit is because it is being 
instantiated here: 
https://github.com/preset-io/superset/blob/master/superset/views/core.py#L2393
   
   with the `request.json`, that is why the only limit is queryLimit, because 
at that point we haven't parsed the SQL yet. 



-- 
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: [email protected]

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