You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/05/13 05:33:59 UTC

[GitHub] [incubator-superset] mistercrunch commented on a change in pull request #7485: Break line before LIMIT statement to prevent trailing comment issue

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org