-
Notifications
You must be signed in to change notification settings - Fork 606
Support nested joins #100
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
Support nested joins #100
Conversation
Pull Request Test Coverage Report for Build 290
💛 - Coveralls |
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.
I thought fixing this would have to deal with the weird way we store joins, with FROM foo NATURAL JOIN bar, baz NATURAL JOIN qux
stored as vec![Natural "bar", Implicit "baz", Natural "qux"]
instead of From [Natural ("foo", "bar"), Natural("baz", "qux")]
.
But as I realized just now, this is an unrelated uncontroversial change: adding support for the <parenthesized joined table>
variant defined in the spec.
This doesn't handle ((a NATURAL JOIN b))
just as we didn't handle ((SELECT ..))
derived tables, which I think is OK.
LGTM, thanks!
Oh wow, that is some headscratching syntax. I've never seen anyone combine the implicit and explicit syntaxes before! I wasn't even aware that was possible. Sigh.
Oh, good catch. I'm going to merge for now, but I'll investigate making a follow-on PR to support double parens. |
SELECT * FROM (((SELECT 1))) is just as valid as SELECT * FROM (SELECT 1). Add a test to ensure that we can parse the first form. Addresses a comment from apache#100.
Wait... I think we do support this! Unless I'm misunderstanding. See #108. |
I took a stab at fixing this in #109. Discussion to follow there. |
SELECT * FROM (((SELECT 1))) is just as valid as SELECT * FROM (SELECT 1). Add a test to ensure that we can parse the first form. Addresses a comment from apache#100.
Fix #83.
@nickolay this is everything, for the moment! Feel free to review/merge in any order. I'll take care of rebasing whatever winds up conflicting (though feel free to rebase yourself, if you're so inclined).