-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse fill causes bad query to parse correctly #6543
Milestone
Comments
jsternberg
added a commit
that referenced
this issue
May 3, 2016
…xpression The previous parseFill would try to parse an expression and only unscan one token when it failed. This caused it to not put back the correct number of tokens with some expression. Now it has been modified to check for the fill ident ahead of time and then use ParseExpr() to parse the call. If the expression fails to parse into a call, it will send an error instead of trying to continue with an invalid parser state. Fixes #6543.
jsternberg
added a commit
that referenced
this issue
May 10, 2016
…xpression The previous parseFill would try to parse an expression and only unscan one token when it failed. This caused it to not put back the correct number of tokens with some expression. Now it has been modified to check for the fill ident ahead of time and then use ParseExpr() to parse the call. If the expression fails to parse into a call, it will send an error instead of trying to continue with an invalid parser state. Fixes #6543.
jsternberg
added a commit
that referenced
this issue
Aug 1, 2016
…xpression The previous parseFill would try to parse an expression and only unscan one token when it failed. This caused it to not put back the correct number of tokens with some expression. Now it has been modified to check for the fill ident ahead of time and then use ParseExpr() to parse the call. If the expression fails to parse into a call, it will send an error instead of trying to continue with an invalid parser state. Fixes #6543.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code used to check for
fill(0)
gets parsed strangely that allows a query like this to work:This query shouldn't work, but it currently does work because the parser tries to check for a
FILL()
call right after the FROM. If it fails to parse the expression (asvalue + LIMIT
is not a valid expression), it will only unread one token rather than all of the tokens used to parse the expression. This means only theLIMIT
token gets unread from the token stream and the parser moves on to parse theLIMIT
section of the query.The text was updated successfully, but these errors were encountered: