sujiplr commented on a change in pull request #18746:
URL: https://github.com/apache/superset/pull/18746#discussion_r810757136
##########
File path: superset/sql_lab.py
##########
@@ -290,9 +290,12 @@ def execute_sql_statement( # pylint:
disable=too-many-arguments,too-many-locals
def apply_limit_if_exists(
database: Database, increased_limit: Optional[int], query: Query, sql: str
) -> str:
+ print("apply_limit_if_exists")
+ print(database.db_engine_spec.allow_limit_clause)
Review comment:
Done
##########
File path: superset/models/core.py
##########
@@ -488,7 +488,13 @@ def select_star( # pylint: disable=too-many-arguments
def apply_limit_to_sql(
self, sql: str, limit: int = 1000, force: bool = False
) -> str:
- return self.db_engine_spec.apply_limit_to_sql(sql, limit, self,
force=force)
+ if self.db_engine_spec.allow_limit_clause:
+ return self.db_engine_spec.apply_limit_to_sql(sql, limit, self,
force=force)
+ else:
+ return self.db_engine_spec.apply_top_to_sql(sql, limit)
+
+ def apply_top_to_sql(self, sql: str, limit: int = 1000, force: bool =
False) -> str:
Review comment:
Done
--
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]