Skip to content
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

Implement a workaround for Full joins in SQLite #5254

Closed
1 task done
wdanilo opened this issue Feb 5, 2023 · 1 comment · Fixed by #6215
Closed
1 task done

Implement a workaround for Full joins in SQLite #5254

wdanilo opened this issue Feb 5, 2023 · 1 comment · Fixed by #6215
Assignees
Labels
-libs Libraries: New libraries to be implemented l-join p-low Low priority x-new-feature Type: new feature request
Milestone

Comments

@wdanilo
Copy link
Member

wdanilo commented Feb 5, 2023

This task is automatically imported from the old Task Issue Board and it was originally created by Radosław Waśko.
Original issue is here.


SQLite does not support Right and Full joins.

We have a simple workaround for Right joins which swaps the order and does a left join instead.

For Full joins it is a bit more complicated - we need to do a left join and a right anti-join and then union them.

We should be able to generate a query along the lines of https://stackoverflow.com/a/1923306

The same workaround may be necessary for PostgreSQL, at least when the join condition is more complex, as for non-hashable join conditions regular FULL OUTER JOIN sometimes fails with TODO Turns out this issue was due to a COALESCE present due to null handling. For reasonably simple expressions the full join works without issue.

Blockers:

[#184215302 - Table.union for Database is best implemented before this task is attempted (no ticket yet, currently only for In-Memory)](https://www.pivotaltracker.com/story/show/#184215302 - Table.union for Database is best implemented before this task is attempted (no ticket yet, currently only for In-Memory)) blocked

@jdunkerley jdunkerley added this to the Beta Release milestone Feb 6, 2023
@jdunkerley jdunkerley moved this to ❓New in Issues Board Feb 14, 2023
@jdunkerley jdunkerley moved this from ❓New to 📤 Backlog in Issues Board Feb 14, 2023
@radeusgd radeusgd moved this from 📤 Backlog to 🔧 Implementation in Issues Board Apr 6, 2023
@radeusgd radeusgd mentioned this issue Apr 6, 2023
5 tasks
@radeusgd radeusgd moved this from 🔧 Implementation to 👁️ Code review in Issues Board Apr 6, 2023
@radeusgd radeusgd linked a pull request Apr 6, 2023 that will close this issue
5 tasks
@mergify mergify bot closed this as completed in #6215 Apr 6, 2023
mergify bot pushed a commit that referenced this issue Apr 6, 2023
Closes #5254

In #6189 the SQLite version was bumped to a newer release which has builtin support for Full and Right joins, so no workaround is no longer needed.
@github-project-automation github-project-automation bot moved this from 👁️ Code review to 🟢 Accepted in Issues Board Apr 6, 2023
@enso-bot
Copy link

enso-bot bot commented Apr 7, 2023

Radosław Waśko reports a new STANDUP for yesterday (2023-04-06):

Progress: Removed the Full Join workaround and re-enable Full join tests in SQLite - bumped version supports it out of the box. Merged the PR. Started a Discussion on static call issues. Updated the println fix PR. Started work on adding missing typechecks to column operations. It should be finished by 2023-04-06.

Next Day: Next day I will be working on the #6106 task. Continue work on column typechecks.

MichaelMauderer pushed a commit that referenced this issue Apr 25, 2023
Closes #5254

In #6189 the SQLite version was bumped to a newer release which has builtin support for Full and Right joins, so no workaround is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-libs Libraries: New libraries to be implemented l-join p-low Low priority x-new-feature Type: new feature request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants