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/07/22 17:52:44 UTC

[GitHub] [incubator-superset] villebro commented on a change in pull request #7912: [sqllab] Fix limit parsing bug when using limit-offset comma notation

villebro commented on a change in pull request #7912: [sqllab] Fix limit parsing bug when using limit-offset comma notation
URL: https://github.com/apache/incubator-superset/pull/7912#discussion_r305954299
 
 

 ##########
 File path: superset/sql_parse.py
 ##########
 @@ -182,7 +182,7 @@ def _extract_limit_from_query(self, statement):
             _, token = statement.token_next(idx=idx)
             if token:
                 if isinstance(token, IdentifierList):
-                    _, token = token.token_next(idx=-1)
+                    token = token.tokens[-1]
 
 Review comment:
   I agree using the native methods would be preferable, and I actually tried to go down that path, but it seems the reverse argument is in fact private (`_reverse`), and didn't seem to work similar to `sorted(..., reverse=True)`. Will see if I can come up with a more robust solution.

----------------------------------------------------------------
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