From d789f376b313c1f529236d8cb4530390c8d863ee Mon Sep 17 00:00:00 2001 From: AAfghahi <48933336+AAfghahi@users.noreply.github.com> Date: Wed, 22 Jun 2022 16:21:34 -0400 Subject: [PATCH] async queries limit bug (#20468) (cherry picked from commit 2c16be42e1dac1ce47b698ba30d0d30c0c3e2075) --- superset/sqllab/command.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/superset/sqllab/command.py b/superset/sqllab/command.py index 690a8c4c9ebe..ce41eb6de230 100644 --- a/superset/sqllab/command.py +++ b/superset/sqllab/command.py @@ -140,6 +140,9 @@ def _run_sql_json_exec_from_scratch(self) -> SqlJsonExecutionStatus: self._execution_context.set_query(query) rendered_query = self._sql_query_render.render(self._execution_context) self._set_query_limit_if_required(rendered_query) + self._query_dao.update( + query, {"limit": self._execution_context.query.limit} + ) return self._sql_json_executor.execute( self._execution_context, rendered_query, self._log_params )