This repository has been archived by the owner on Jan 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 109
LEFT OUTER JOIN support #707
Labels
Comments
Note that squash rule cannot be applied to left outer join, so even if we implement it, it's going to be significantly slower than an inner join because of that limitation. With an inner join we know we can have table B derived from table A knowing the relationship between A and B. But if we have to account for all possible values of B, it can't be, so it essentially becomes a cross join with some null columns if a condition is not met. |
erizocosmico
added a commit
to erizocosmico/go-mysql-server
that referenced
this issue
May 15, 2019
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>
erizocosmico
added a commit
to erizocosmico/go-mysql-server
that referenced
this issue
May 15, 2019
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>
@erizocosmico I thought a LEFT JOIN could theoretically be squashed if the left table is previous in the iterator chain? |
After a deeper thought, yes, in that case it can. It will need a bit of a refactor to make it work, but yes |
erizocosmico
added a commit
to erizocosmico/go-mysql-server
that referenced
this issue
May 24, 2019
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>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
LEFT OUTER JOIN support would be nice.
For gitbase, this might be used to check repositories where a given file is absent. Note that for the use cases I'm trying, getting the LEFT OUTER JOIN resolved in Spark with gitbase-spark-connector would be just fine.
The text was updated successfully, but these errors were encountered: