This issue tracks reimplementing the work from stale PR #2892, which has been closed because it is too far out of date to merge directly.
## Original pull request
- PR #2892: [Implemented `OUTER JOIN` support](https://github.com/clockworklabs/SpacetimeDB/pull/2892)
- Original author: @egormanga
## What the original PR was trying to do
# Description of Changes
Previously, only INNER and CROSS joins were possible.
This adds support for LEFT OUTER joins with certain limitations (basically, same as for INNER).
Doesn't play so well with RLS currently, though (I assume it's something to do with query optimization for similar joins, or that RLS discards already right-matched rows without substituting them with null-matched instead).
API and ABI breaking changes
Non-present column values come in as () units (for null) instead of the expected type, so it's like everything suddenly became Optional. This might require some additional handling on the clients.
Probably won't work with the PG wire protocol for the same reason, although the fix for that will be server-side, as the protocol itself is fine with nulls.
Expected complexity level and risk
3.
Testing
This issue tracks reimplementing the work from stale PR #2892, which has been closed because it is too far out of date to merge directly.
Previously, only
INNERandCROSSjoins were possible.This adds support for
LEFT OUTERjoins with certain limitations (basically, same as forINNER).Doesn't play so well with RLS currently, though (I assume it's something to do with query optimization for similar joins, or that RLS discards already right-matched rows without substituting them with null-matched instead).
API and ABI breaking changes
Non-present column values come in as
()units (for null) instead of the expected type, so it's like everything suddenly becameOptional. This might require some additional handling on the clients.Probably won't work with the PG wire protocol for the same reason, although the fix for that will be server-side, as the protocol itself is fine with nulls.
Expected complexity level and risk
3.
Testing
Manual testing
Needs unit tests
Closure context
close-stale-pr-create-issuestale-PR sweep.Reimplementation notes
masterin a new PR.