You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Hash joins can support semijoin with the LHS input on the right, usingthe existing logic for inner join, combined with the assurance that onlythe first match for each inner tuple is considered, which can beachieved by leveraging the HEAP_TUPLE_HAS_MATCH flag. This can be veryuseful in some cases since we may now have the option to hash thesmaller table instead of the larger.Merge join could likely support "Right Semi Join" too. However, thebenefit of swapping inputs tends to be small here, so we do not addressthat in this patch.Note that this patch also modifies a test query in join.sql to ensure itcontinues testing as intended. With this patch the original query wouldresult in a right-semi-join rather than semi-join, compromising itsoriginal purpose of testing the fix for neqjoinsel's behavior forsemi-joins.Author: Richard GuoReviewed-by: wenhui qiu, Alena Rybakina, Japin LiDiscussion:https://postgr.es/m/CAMbWs4_X1mN=ic+SxcyymUqFx9bB8pqSLTGJ-F=MHy4PW3eRXw@mail.gmail.com
Copy file name to clipboardExpand all lines: contrib/postgres_fdw/expected/postgres_fdw.out
+9-6Lines changed: 9 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4127,13 +4127,16 @@ RESET enable_sort;
4127
4127
-- subquery using immutable function (can be sent to remote)
4128
4128
PREPARE st3(int) AS SELECT * FROM ft1 t1 WHERE t1.c1 < $2 AND t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE c1 > $1 AND date(c5) = '1970-01-17'::date) ORDER BY c1;