Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

sql: implement LEFT and RIGHT join #712

Merged
merged 1 commit into from
May 24, 2019

Conversation

erizocosmico
Copy link
Contributor

Closes #707

This PR implements LEFT and RIGHT join. Initial issue only required
LEFT join, but the effort to also add support to RIGHT join was
minimal, so it was added as well.

The join iterator, previously inner join iterator, has been generalized
so it can work for all joins and share all the logic in a single
component instead of having three iterators handling the complex logic
of how to compute the joins (in memory, multipass, etc).

The nodes, however, have very subtle differences that make it worthless
to abstract because most methods need to be different. The only abstractable
part was the RowIter method, which was extracted to a function that's
called from InnerJoin, LeftJoin and RightJoin nodes.

Signed-off-by: Miguel Molina miguel@erizocosmi.co

@erizocosmico erizocosmico requested a review from a team May 15, 2019 12:05
@erizocosmico
Copy link
Contributor Author

CI fails because of C# integration test

@ajnavarro
Copy link
Contributor

could you rebase please?

@erizocosmico
Copy link
Contributor Author

Rebased

Closes src-d#707

This PR implements LEFT and RIGHT join. Initial issue only required
LEFT join, but the effort to also add support to RIGHT join was
minimal, so it was added as well.

The join iterator, previously inner join iterator, has been generalized
so it can work for all joins and share all the logic in a single
component instead of having three iterators handling the complex logic
of how to compute the joins (in memory, multipass, etc).

The nodes, however, have very subtle differences that make it worthless
to abstract because most methods need to be different. The only abstractable
part was the RowIter method, which was extracted to a function that's
called from InnerJoin, LeftJoin and RightJoin nodes.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@ajnavarro ajnavarro merged commit 55a6916 into src-d:master May 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LEFT OUTER JOIN support
3 participants