mistercrunch commented on a change in pull request #8867: [WIP] Customize
schema name for the CTA queries
URL:
https://github.com/apache/incubator-superset/pull/8867#discussion_r360616280
##########
File path: superset/sql_parse.py
##########
@@ -222,7 +222,10 @@ def get_query_with_new_limit(self, new_limit: int) -> str:
limit_pos = pos
break
_, limit = statement.token_next(idx=limit_pos)
- if limit.ttype == sqlparse.tokens.Literal.Number.Integer:
+ # Override the limit only when it exceeds the configured value.
+ if limit.ttype == sqlparse.tokens.Literal.Number.Integer and new_limit
< int(
Review comment:
Mmmh, this here in theory changes what the function is expected to do
("returns the query with the specified limit"), so either we change the
name/docstring to reflect that, or either we move the conditional logic towards
where the function is called.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]