Re: Support "Right Semi Join" plan shapes

2024-07-04 Thread Richard Guo
On Thu, Jul 4, 2024 at 11:18 PM Japin Li wrote: > On Thu, 04 Jul 2024 at 17:17, Richard Guo wrote: > > Here is a new rebase. > > > > Barring objections, I'm planning to push it soon. Pushed. Thanks for all the reviews. > Thanks for updating the patch. It looks good to me, except for a minor

Re: Support "Right Semi Join" plan shapes

2024-07-04 Thread Japin Li
On Thu, 04 Jul 2024 at 17:17, Richard Guo wrote: > On Fri, Jun 28, 2024 at 3:21 PM Richard Guo wrote: >> On Fri, Jun 28, 2024 at 2:54 PM Richard Guo wrote: >> > I've refined this test case further to make it more stable by using an >> > additional filter 'a.tenthous < 5000'. Besides, I noticed

Re: Support "Right Semi Join" plan shapes

2024-07-04 Thread wenhui qiu
Hi Richard Guo Thank you for updating the patch.Tested on v8 , It looks good to me Thanks Richard Guo 于2024年7月4日周四 17:18写道: > On Fri, Jun 28, 2024 at 3:21 PM Richard Guo > wrote: > > On Fri, Jun 28, 2024 at 2:54 PM Richard Guo > wrote: > > > I've refined this test case further to make

Re: Support "Right Semi Join" plan shapes

2024-07-04 Thread Richard Guo
On Fri, Jun 28, 2024 at 3:21 PM Richard Guo wrote: > On Fri, Jun 28, 2024 at 2:54 PM Richard Guo wrote: > > I've refined this test case further to make it more stable by using an > > additional filter 'a.tenthous < 5000'. Besides, I noticed a surplus > > blank line in ExecHashJoinImpl(). I've r

Re: Support "Right Semi Join" plan shapes

2024-06-28 Thread Richard Guo
On Fri, Jun 28, 2024 at 2:54 PM Richard Guo wrote: > On Mon, Jun 24, 2024 at 5:59 PM Richard Guo wrote: > > I noticed that this patch changes the plan of a query in join.sql from > > a semi join to right semi join, compromising the original purpose of > > this query, which was to test the fix for

Re: Support "Right Semi Join" plan shapes

2024-06-27 Thread Richard Guo
On Mon, Jun 24, 2024 at 5:59 PM Richard Guo wrote: > I noticed that this patch changes the plan of a query in join.sql from > a semi join to right semi join, compromising the original purpose of > this query, which was to test the fix for neqjoinsel's behavior for > semijoins (see commit 7ca25b7d)

Re: Support "Right Semi Join" plan shapes

2024-06-24 Thread wenhui qiu
Hi Japin Li Thank you for your reviewing ,This way the notes are more accurate and complete. Thanks also to the author for updating the patch ,I also tested the new patch ,It looks good to me Regrads Japin Li 于2024年6月25日周二 08:51写道: > On Mon, 24 Jun 2024 at 17:59, Richard Guo wrote: > > T

Re: Support "Right Semi Join" plan shapes

2024-06-24 Thread Japin Li
On Mon, 24 Jun 2024 at 17:59, Richard Guo wrote: > Thank you for reviewing. > > On Mon, Jun 24, 2024 at 1:27 PM Li Japin wrote: >> + /* >> +* For now we do not support RIGHT_SEMI join in mergejoin or nestloop >> +* join. >> +*/ >> + if (jointype == JOIN_RIGHT_S

Re: Support "Right Semi Join" plan shapes

2024-06-24 Thread Richard Guo
Thank you for reviewing. On Mon, Jun 24, 2024 at 1:27 PM Li Japin wrote: > + /* > +* For now we do not support RIGHT_SEMI join in mergejoin or nestloop > +* join. > +*/ > + if (jointype == JOIN_RIGHT_SEMI) > + return; > + > > How about adding some

Re: Support "Right Semi Join" plan shapes

2024-06-23 Thread Li Japin
Hi, Richard > On Apr 25, 2024, at 11:28, Richard Guo wrote: > > Here is another rebase with a commit message to help review. I also > tweaked some comments. Thank you for updating the patch, here are some comments on the v5 patch. + /* +* For now we do not support RIGHT_SEMI joi

Re: Support "Right Semi Join" plan shapes

2024-04-28 Thread wenhui qiu
Hi Richard Thank you so much for your tireless work on this,I see the new version of the patch improves some of the comments .I think it can commit in July Thanks On Thu, 25 Apr 2024 at 11:28, Richard Guo wrote: > Here is another rebase with a commit message to help review. I also > twea

Re: Support "Right Semi Join" plan shapes

2024-04-24 Thread Richard Guo
Here is another rebase with a commit message to help review. I also tweaked some comments. Thanks Richard v5-0001-Support-Right-Semi-Join-plan-shapes.patch Description: Binary data

Re: Support "Right Semi Join" plan shapes

2024-03-09 Thread Alena Rybakina
On 06.03.2024 05:23, wenhui qiu wrote: Hi Alena Rybakina For merge join + /* + * For now we do not support RIGHT_SEMI join in mergejoin. + */ + if (jointype == JOIN_RIGHT_SEMI) + { + *mergejoin_allowed = false; + return NIL; + }

Re: Support "Right Semi Join" plan shapes

2024-03-05 Thread wenhui qiu
Hi Alena Rybakina For merge join + /* + * For now we do not support RIGHT_SEMI join in mergejoin. + */ + if (jointype == JOIN_RIGHT_SEMI) + { + *mergejoin_allowed = false; + return NIL; + } + Tanks On Wed, 6 Mar 2024 at 04:10, Alena Rybakina wrote: > To be honest, I didn't see it in the code, co

Re: Support "Right Semi Join" plan shapes

2024-03-05 Thread Alena Rybakina
To be honest, I didn't see it in the code, could you tell me where they are, please? On 05.03.2024 05:44, Richard Guo wrote: On Tue, Jan 30, 2024 at 2:51 PM Alena Rybakina wrote: I have reviewed your patch and I think it is better to add an Assert for JOIN_RIGHT_SEMI to the Exe

Re: Support "Right Semi Join" plan shapes

2024-03-04 Thread wenhui qiu
Hi Richard Agree +1 ,I think can push now. Richard On Tue, 5 Mar 2024 at 10:44, Richard Guo wrote: > > On Tue, Jan 30, 2024 at 2:51 PM Alena Rybakina > wrote: > >> I have reviewed your patch and I think it is better to add an Assert for >> JOIN_RIGHT_SEMI to the ExecMergeJoin and ExecNest

Re: Support "Right Semi Join" plan shapes

2024-03-04 Thread Richard Guo
On Tue, Jan 30, 2024 at 2:51 PM Alena Rybakina wrote: > I have reviewed your patch and I think it is better to add an Assert for > JOIN_RIGHT_SEMI to the ExecMergeJoin and ExecNestLoop functions to > prevent the use of RIGHT_SEMI for these types of connections (NestedLoop > and MergeJoin). Hmm,

Re: Support "Right Semi Join" plan shapes

2024-03-04 Thread Richard Guo
On Mon, Mar 4, 2024 at 10:33 AM wenhui qiu wrote: > HI Richard > Now it is starting the last commitfest for v17, can you respond to > Alena Rybakina points? > Thanks for reminding. Will do that soon. Thanks Richard

Re: Support "Right Semi Join" plan shapes

2024-03-03 Thread wenhui qiu
HI Richard Now it is starting the last commitfest for v17, can you respond to Alena Rybakina points? Regards On Thu, 8 Feb 2024 at 13:50, wenhui qiu wrote: > Hi Alena Rybakina > I saw this code snippet also disable mergejoin ,I think it same effect > + /* > + * For now we do not support

Re: Support "Right Semi Join" plan shapes

2024-02-07 Thread wenhui qiu
Hi Alena Rybakina I saw this code snippet also disable mergejoin ,I think it same effect + /* + * For now we do not support RIGHT_SEMI join in mergejoin. + */ + if (jointype == JOIN_RIGHT_SEMI) + { + *mergejoin_allowed = false; + return NIL; + } + Regards Alena Rybakina 于2024年1月30日周二 14:51写道:

Re: Support "Right Semi Join" plan shapes

2024-01-29 Thread Alena Rybakina
Hi! Thank you for your work on this subject. I have reviewed your patch and I think it is better to add an Assert for JOIN_RIGHT_SEMI to the ExecMergeJoin and ExecNestLoop functions to prevent the use of RIGHT_SEMI for these types of connections (NestedLoop and MergeJoin). Mostly I'm suggestin

Re: Support "Right Semi Join" plan shapes

2024-01-23 Thread wenhui qiu
Hi vignesh C Many thanks, I have marked it to "ready for committer" Best wish vignesh C 于2024年1月23日周二 10:56写道: > On Mon, 22 Jan 2024 at 11:27, wenhui qiu wrote: > > > > Hi vignesh CI saw this path has been passed ( > https://cirrus-ci.com/build/6109321080078336),can we push it? > > I

Re: Support "Right Semi Join" plan shapes

2024-01-22 Thread vignesh C
On Mon, 22 Jan 2024 at 11:27, wenhui qiu wrote: > > Hi vignesh CI saw this path has been passed > (https://cirrus-ci.com/build/6109321080078336),can we push it? If you have found no comments from your review and testing, let's mark it as "ready for committer". Regards, Vignesh

Re: Support "Right Semi Join" plan shapes

2024-01-21 Thread wenhui qiu
Hi vignesh CI saw this path has been passed ( https://cirrus-ci.com/build/6109321080078336),can we push it? Best wish Richard Guo 于2024年1月9日周二 18:49写道: > > On Sun, Jan 7, 2024 at 3:03 PM vignesh C wrote: > >> One of the tests in CFBot has failed at [1] with: >> - Relations: (public.ft1

Re: Support "Right Semi Join" plan shapes

2024-01-09 Thread Richard Guo
On Sun, Jan 7, 2024 at 3:03 PM vignesh C wrote: > One of the tests in CFBot has failed at [1] with: > - Relations: (public.ft1 t1) SEMI JOIN (public.ft2 t2) > - Remote SQL: SELECT r1."C 1", r1.c2, r1.c3, r1.c4, r1.c5, r1.c6, > r1.c7, r1.c8 FROM "S 1"."T 1" r1 WHERE ((r1."C 1" < 20)) AND EXIST

Re: Support "Right Semi Join" plan shapes

2024-01-06 Thread vignesh C
On Wed, 1 Nov 2023 at 11:25, Richard Guo wrote: > > > On Thu, Aug 10, 2023 at 3:24 PM Richard Guo wrote: >> >> The cfbot reminds that this patch does not apply any more, so rebase it >> to v2. > > > Attached is another rebase over the latest master. Any feedback is > appreciated. One of the tes

Re: Support "Right Semi Join" plan shapes

2023-12-27 Thread wenhui qiu
Hi Richard Guo I did a simple test ,Subqueries of type (in) can be supported, There is a test sql that doesn't support it, and I think that's because it can't pull up the subqueries. ``` test=# explain (costs off) SELECT t1.* FROM prt1_adv t1 WHERE EXISTS (SELECT 1 FROM prt2_adv t2 WHERE t1.

Support "Right Semi Join" plan shapes

2023-12-14 Thread wenhui qiu
Hi Richard Guo I see that the test samples are all (exists) subqueries ,I think semi join should also support ( in) and ( any) subqueries. would you do more test on ( in) and ( any) subqueries? Best whish

Re: Support "Right Semi Join" plan shapes

2023-10-31 Thread Richard Guo
On Thu, Aug 10, 2023 at 3:24 PM Richard Guo wrote: > The cfbot reminds that this patch does not apply any more, so rebase it > to v2. > Attached is another rebase over the latest master. Any feedback is appreciated. Thanks Richard v3-0001-Support-Right-Semi-Join-plan-shapes.patch Description

Re: Support "Right Semi Join" plan shapes

2023-08-10 Thread Richard Guo
On Tue, Apr 18, 2023 at 5:07 PM Richard Guo wrote: > In thread [1] which discussed 'Right Anti Join', Tom once mentioned > 'Right Semi Join'. After a preliminary investigation I think it is > beneficial and can be implemented with very short change. With 'Right > Semi Join', what we want to do

Support "Right Semi Join" plan shapes

2023-04-18 Thread Richard Guo
In thread [1] which discussed 'Right Anti Join', Tom once mentioned 'Right Semi Join'. After a preliminary investigation I think it is beneficial and can be implemented with very short change. With 'Right Semi Join', what we want to do is to just have the first match for each inner tuple. For Ha