mirror of
https://github.com/apache/superset.git
synced 2026-05-07 08:54:23 +00:00
Break line before LIMIT statement to prevent trailing comment issue (#7485)
* Break line before LIMIT statement to prevent trailing comment issue This may not be a perfect solution but it addresses the issue in 7483 closes https://github.com/apache/incubator-superset/issues/7483 * fix tests
This commit is contained in:
committed by
GitHub
parent
4377328e39
commit
d8be0a7dd5
@@ -168,7 +168,7 @@ class ParsedQuery(object):
|
||||
"""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}'
|
||||
limit_pos = None
|
||||
tokens = self._parsed[0].tokens
|
||||
# Add all items to before_str until there is a limit
|
||||
|
||||
Reference in New Issue
Block a user