Re: [HACKERS] PoC: full merge join on comparison clause

2018-11-21 Thread Alexander Kuzmenkov
On 11/19/18 04:46, Tom Lane wrote: In short, proceeding like the above when we can't find another plan type for a full join seems like it fixes a far wider variety of cases. The possibility that maybe we could do some of those cases a bit faster isn't sufficiently attractive to me to justify

Re: [HACKERS] PoC: full merge join on comparison clause

2018-11-18 Thread Tom Lane
Alexander Kuzmenkov writes: > [ Inequality-merge-join-v10.patch ] Just thinking about this patch a bit ... I wonder why you were so quick to reject the UNION approach at the outset. This patch is pretty messy, and it complicates a lot of stuff that is quite fundamental to the planner, and you

Re: [HACKERS] PoC: full merge join on comparison clause

2018-07-30 Thread Alexander Kuzmenkov
El 18/07/18 a las 16:58, Ashutosh Bapat escribió: Thanks for the commit messages. I would use word "in-equality" instead of "comparison" since equality is also a comparison. Fixed. Comparing this with the original code, I think, is_mj_equality should be true if restrictinfo->mergeopfamilies

Re: [HACKERS] PoC: full merge join on comparison clause

2018-07-18 Thread Ashutosh Bapat
On Tue, Jul 10, 2018 at 10:06 PM, Alexander Kuzmenkov wrote: > I tried to fix the things you mentioned and improve the comments. Among > other changes, there is now a description of how merge join works with > inequalities at the top of nodeMergejoin.c. It also explains why we only > support one

Re: [HACKERS] PoC: full merge join on comparison clause

2018-07-10 Thread Alexander Kuzmenkov
I tried to fix the things you mentioned and improve the comments. Among other changes, there is now a description of how merge join works with inequalities at the top of nodeMergejoin.c. It also explains why we only support one inequality clause. Some particular points: On 07/06/2018 04:01

Re: [HACKERS] PoC: full merge join on comparison clause

2018-07-10 Thread Ashutosh Bapat
On Tue, Jul 10, 2018 at 12:05 AM, Alexander Kuzmenkov wrote: > On 07/09/2018 04:12 PM, Ashutosh Bapat wrote: >> >> On Fri, Jul 6, 2018 at 6:31 PM, Ashutosh Bapat >> wrote: >>> >>> I will continue reviewing the patches. >>> >> Here are some more review comments > > > > Ashutosh, > > Many thanks

Re: [HACKERS] PoC: full merge join on comparison clause

2018-07-09 Thread Alexander Kuzmenkov
On 07/09/2018 04:12 PM, Ashutosh Bapat wrote: On Fri, Jul 6, 2018 at 6:31 PM, Ashutosh Bapat wrote: I will continue reviewing the patches. Here are some more review comments Ashutosh, Many thanks for the review, I'm glad that we are continuing with this patch. I'm working on your

Re: [HACKERS] PoC: full merge join on comparison clause

2018-07-09 Thread Ashutosh Bapat
On Fri, Jul 6, 2018 at 6:31 PM, Ashutosh Bapat wrote: > > I will continue reviewing the patches. > Here are some more review comments - * sort ordering for each merge key. The mergejoinable operator is an - * equality operator in the opfamily, and the two inputs are guaranteed to be + * sort

Re: [HACKERS] PoC: full merge join on comparison clause

2018-07-06 Thread Ashutosh Bapat
Hi, I have started reviewing these patches. I haven't grasped the design yet. But here are some comments on the first patch. -clauses = (MergeJoinClause) palloc0(nClauses * sizeof(MergeJoinClauseData)); +parent->mj_Clauses = (MergeJoinClause) palloc0(nClauses *

Re: [HACKERS] PoC: full merge join on comparison clause

2018-03-06 Thread Alexander Kuzmenkov
On 05.03.2018 08:30, Ashutosh Bapat wrote: But creating such patches using git format-patch (with -v as some suggest) really helps in general. Thanks for the advice. I heard about this workflow, but never used it myself. Perhaps it's time to try it. -- Alexander Kuzmenkov Postgres

Re: [HACKERS] PoC: full merge join on comparison clause

2018-03-04 Thread Ashutosh Bapat
On Fri, Mar 2, 2018 at 8:02 PM, Alexander Kuzmenkov wrote: > On 22.02.2018 21:42, Alexander Kuzmenkov wrote: >> >> >> Some basic joins work, but I couldn't properly test all the corner cases >> with different orderings, because they depend on a bug in vanilla merge >>

Re: [HACKERS] PoC: full merge join on comparison clause

2018-03-02 Thread Alexander Kuzmenkov
On 22.02.2018 21:42, Alexander Kuzmenkov wrote: Some basic joins work, but I couldn't properly test all the corner cases with different orderings, because they depend on a bug in vanilla merge joins [1]. The bug was fixed, so here is the rebased patch. The planner part of the patch is

Re: [HACKERS] PoC: full merge join on comparison clause

2018-02-22 Thread Alexander Kuzmenkov
Here are some updates on this patch. I split it into two parts. The preparatory part contains some mechanical changes to prepare for the main part. Most importantly, a new field is added, `RestrictInfo.is_mj_equality`. It is a marker of mergejoinable equality clauses, and

Re: [HACKERS] PoC: full merge join on comparison clause

2018-01-23 Thread Stephen Frost
Greetings Alexander, * Alexander Kuzmenkov (a.kuzmen...@postgrespro.ru) wrote: > Here is the patch rebased to a852cfe9. Thanks for updating it. This would definitely be nice to have. Ashutosh, thanks for your previous review, would you have a chance to look at it again? Would be great to at

Re: [HACKERS] PoC: full merge join on comparison clause

2017-12-04 Thread Alexander Kuzmenkov
Here is the patch rebased to a852cfe9. -- Alexander Kuzmenkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index ef9e1ee471..c842ed2968 100644 ---