mistercrunch commented on a change in pull request #7485: Break line before
LIMIT statement to prevent trailing comment issue
URL:
https://github.com/apache/incubator-superset/pull/7485#discussion_r283191854
##########
File path: superset/sql_parse.py
##########
@@ -168,7 +168,7 @@ def get_query_with_new_limit(self, new_limit):
"""returns the query with the specified limit"""
"""does not change the underlying query"""
if not self._limit:
- return self.sql + ' LIMIT ' + str(new_limit)
+ return f'{self.sql}\nLIMIT {new_limit}'
Review comment:
Let's try to keep the comments around for logging purposes. I wouldn't
really mind stripping them if needed, but it's nice for the user to be able to
recognize their query (formatting, comments) on the db server logs.
----------------------------------------------------------------
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]