Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: Add support for NOT IN with subqueries
Add support for compiling NOT IN queries with subqueries, compiled similarly to IN with subqueries, except that the join uses an "antijoin" idiom - a LEFT JOIN followed by an IS NULL on a column projected on the right-hand side. Release-Note-Core: Add support for queries with a WHERE clause containing NOT IN with subqueries on the right-hand side Change-Id: I0b8e17b7bd91da33a330db346f2b7792316e140f Reviewed-on: https://gerrit.readyset.name/c/readyset/+/5523 Tested-by: Buildkite CI Reviewed-by: Dan Wilbanks <dan@readyset.io>
- Loading branch information
1 parent
380b258
commit 3c87547
Showing
3 changed files
with
98 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,10 @@ OR y = 2 | |
---- | ||
1 | ||
2 | ||
|
||
query I rowsort | ||
select y from t1 | ||
where x not in (select x from t2) | ||
---- | ||
2 | ||
3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters