This repository was archived by the owner on May 9, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support join on rowid by skipping the hash table build and computing the row offset in the probe. Offset computation consists of null handling and range handling. For an empty table, we use roughly the expression range of (0, -1) which always returns -1 inside the newly added
rowid_hash_join_idx
runtime function.There is one limitation -- because of this approach of not building the table we cannot support a query of the form
t1.rowid = t2.rowid AND ....
. Loop joins still work of course. If this query becomes something we need to support with hash join, we can push the secondary join expression into filters and run a mini-loop join on each row that passes the rowid "hash".Added a bunch of tests but could probably use some more coverage. Open to ideas. The way I force the hash table builder to skip the build is by marking it empty during construction. This is kind of a hack, but I think it's ok for now with the checks I've added.
Closes #165