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 16:17:26 UTC

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

john-bodley 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_r305912041
 
 

 ##########
 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:
   Could you use `token_next(..., reverse=True)`. This skips comments, whitespace etc. and thus is probably more robust.

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