Skip to content
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

Syntax error for "using" in join #24

Closed
IronSavior opened this issue Nov 14, 2017 · 3 comments
Closed

Syntax error for "using" in join #24

IronSavior opened this issue Nov 14, 2017 · 3 comments

Comments

@IronSavior
Copy link

This is a fantastically complete and fast parser, but I have one problem case to report. It doesn't seem to understand queries where the "using" shorthand is used in a join.

Reproduce with:
Parsing: select * from t1 join t2 using(id) yields error: syntax error at position 31 near 'using'

@bramp
Copy link
Collaborator

bramp commented Nov 25, 2017

I've fixed this upstream vitessio/vitess#3403 and will pull the fix into this repo shortly.

@IronSavior
Copy link
Author

That's real nice. Thanks!

bramp added a commit that referenced this issue Nov 28, 2017
* Refactored the "join" parsing a little, to add support for "using(a, b, c)" and more strictly follow the mysql grammar for JOIN vs STRAIGHT_JOIN vs OUTER JOIN, etc.
* Switch JoinCondition to no longer be a pointer, to avoid nil-pointers in existing code.
* Add test for issue #24.
@bramp
Copy link
Collaborator

bramp commented Nov 28, 2017

This is now fixed by b1aa60e

@bramp bramp closed this as completed Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants