go-mysql-server
go-mysql-server copied to clipboard
More join types
Add FullOuterJoin
, SemiJoin
, and AntiJoin
.
None of these new join nodes are safe for join ordering transformations yet. They are explicitly excluded from join planning.
The getField indexes for these three nodes' join conditions deserve more consideration. I excluded them from auto-fixup after manually correcting join condition get fields for the appropriate schemas.
FullOuterJoin
uses a union distinct execution operator, which is correct but a lot slower than a merge join-esque operator.
SemiJoin
and AntiJoin
rearrange subquery expression scopes. I separate resolve
and finalizeSubqueryExpressions
to perform decorrelation before predicate pushdown (where we were panicking on FixUpExpressions) and join ordering (we want to decorrelate scopes before join planning).
Other:
- query plan tests added for exist hoisting edge cases i did not catch on first pass
- fixed bug with CTE stars