-
Notifications
You must be signed in to change notification settings - Fork 670
Add Support in the "Position" Function #463
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
Conversation
Pull Request Test Coverage Report for Build 2215898239
💛 - Coveralls |
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @yuval-illumex -- Does POSITION('@' in 'foo') parse in sqlparser without changes today? Or is this PR required to parse the expression?
|
@alamb Updated the PR, changed the POSITION function to be like any other function (But the parsed response must use a struct for POSITION) |
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delayed review @yuval-illumex -- I have been quite busy recently.
I didn't appreciate that <expr> IN <expr> was only valid within the context of a POSITION() function. Sorry for my confusion
Can you please change this code so that the POSITION function is handled specially (I realize you did do that initially and I implied you should change)?
Thanks and sorry again.
|
@alamb Thanks for the detailed feedback! Missed the bug with IN. |
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me -- thank you @yuval-illumex ❤️
|
I wrote up a small negative case here as well: #469 |
* Add support in the position function * Add Test * Add lint fixes * Remove if * Change from to in * Remove special method for position * Fix lint * PR Review
* Add support in the position function * Add Test * Add lint fixes * Remove if * Change from to in * Remove special method for position * Fix lint * PR Review
* Add support in the position function * Add Test * Add lint fixes * Remove if * Change from to in * Remove special method for position * Fix lint * PR Review
Add support to the function position as described in the docs
Example: