Re: Wired if-statement in gen_partprune_steps_internal

2021-04-12 Thread Andy Fan
On Thu, Apr 8, 2021 at 7:59 PM Amit Langote wrote: > On Thu, Apr 8, 2021 at 7:41 PM David Rowley wrote: > > On Thu, 8 Apr 2021 at 21:04, Amit Langote > wrote: > > > Maybe, we should also updated the description of node struct as > > > follows to consider that last point: > >> > > > * Partition

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-08 Thread Amit Langote
On Thu, Apr 8, 2021 at 7:41 PM David Rowley wrote: > On Thu, 8 Apr 2021 at 21:04, Amit Langote wrote: > > Maybe, we should also updated the description of node struct as > > follows to consider that last point: >> > > * PartitionPruneStepOp - Information to prune using a set of mutually ANDed >

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-08 Thread David Rowley
On Thu, 8 Apr 2021 at 21:04, Amit Langote wrote: > + * These partition pruning steps come in 2 forms; operation steps and combine > + * steps. > > Maybe you meant "operator" steps? IIRC, the reason why we named it > PartitionPruneStepOp is that an op step is built to prune based on the > semantic

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-08 Thread Amit Langote
On Thu, Apr 8, 2021 at 5:34 PM David Rowley wrote: > On Thu, 8 Apr 2021 at 00:49, Amit Langote wrote: > > > > Thanks David. Actually, I was busy updating the patch to revert to > > gen_partprune_steps_internal() returning a list and was almost done > > with it when I saw your message. > > > > I

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-08 Thread David Rowley
On Thu, 8 Apr 2021 at 00:49, Amit Langote wrote: > > Thanks David. Actually, I was busy updating the patch to revert to > gen_partprune_steps_internal() returning a list and was almost done > with it when I saw your message. > > I read through v3 and can say that it certainly looks better than v2

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread Amit Langote
On Wed, Apr 7, 2021 at 6:53 PM David Rowley wrote: > On Wed, 7 Apr 2021 at 21:04, Amit Langote wrote: > > > > On Wed, Apr 7, 2021 at 4:43 PM David Rowley wrote: > > > However, it does change the meaning of what PARTCLAUSE_MATCH_STEPS > > > does. If we ever needed to expand what PARTCLAUSE_MATCH_

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread Amit Langote
On Wed, Apr 7, 2021 at 8:44 PM David Rowley wrote: > On Wed, 7 Apr 2021 at 21:53, David Rowley wrote: > > If canonicalize_qual() had been unable to rewrite that WHERE clause > > then I could see that we might want to combine steps from other > > recursive quals. I'm thinking right now that I'm gl

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread David Rowley
On Wed, 7 Apr 2021 at 21:53, David Rowley wrote: > If canonicalize_qual() had been unable to rewrite that WHERE clause > then I could see that we might want to combine steps from other > recursive quals. I'm thinking right now that I'm glad > canonicalize_qual() does that hard work for us. (I thi

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread David Rowley
On Wed, 7 Apr 2021 at 21:04, Amit Langote wrote: > > On Wed, Apr 7, 2021 at 4:43 PM David Rowley wrote: > > However, it does change the meaning of what PARTCLAUSE_MATCH_STEPS > > does. If we ever needed to expand what PARTCLAUSE_MATCH_STEPS does, > > then we'll have less flexibility with the newl

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread Amit Langote
On Wed, Apr 7, 2021 at 4:43 PM David Rowley wrote: > On Thu, 4 Mar 2021 at 19:03, Amit Langote wrote: > > On Tue, Oct 20, 2020 at 9:46 PM Amit Langote > > wrote: > > > I had updated the patch last week to address Horiguchi-san's comments > > > but didn't manage to post a polished-enough version

Re: Wired if-statement in gen_partprune_steps_internal

2021-04-07 Thread David Rowley
On Thu, 4 Mar 2021 at 19:03, Amit Langote wrote: > > On Tue, Oct 20, 2020 at 9:46 PM Amit Langote wrote: > > I had updated the patch last week to address Horiguchi-san's comments > > but didn't manage to post a polished-enough version. I will try again > > this week. > > Sorry, this seems to hav

Re: Wired if-statement in gen_partprune_steps_internal

2021-03-23 Thread Amit Langote
Hi Ryan, On Tue, Mar 23, 2021 at 2:24 AM Ryan Lambert wrote: > Should the status of this patch be updated to ready for comitter to get in > line for Pg 14 deadline? Yes, I've done that. Thanks for the reminder. -- Amit Langote EDB: http://www.enterprisedb.com

Re: Wired if-statement in gen_partprune_steps_internal

2021-03-22 Thread Ryan Lambert
Should the status of this patch be updated to ready for comitter to get in line for Pg 14 deadline? *Ryan Lambert* On Sun, Mar 7, 2021 at 11:38 PM Amit Langote wrote: > On Fri, Mar 5, 2021 at 7:50 AM Ryan Lambert > wrote: > > On Wed, Mar 3, 2021 at 11:03 PM Amit Langote > wrote: > >> > >> Sor

Re: Wired if-statement in gen_partprune_steps_internal

2021-03-07 Thread Amit Langote
On Fri, Mar 5, 2021 at 7:50 AM Ryan Lambert wrote: > On Wed, Mar 3, 2021 at 11:03 PM Amit Langote wrote: >> >> Sorry, this seems to have totally slipped my mind. >> >> Attached is the patch I had promised. >> >> Also, I have updated the title of the CF entry to "Some cosmetic >> improvements of p

Re: Wired if-statement in gen_partprune_steps_internal

2021-03-04 Thread Ryan Lambert
On Wed, Mar 3, 2021 at 11:03 PM Amit Langote wrote: > Sorry, this seems to have totally slipped my mind. > > Attached is the patch I had promised. > > Also, I have updated the title of the CF entry to "Some cosmetic > improvements of partition pruning code", which I think is more > appropriate. >

Re: Wired if-statement in gen_partprune_steps_internal

2021-03-03 Thread Amit Langote
On Tue, Oct 20, 2020 at 9:46 PM Amit Langote wrote: > On Tue, Oct 20, 2020 at 4:05 PM Andy Fan wrote: > > On Wed, Oct 14, 2020 at 11:26 AM Andy Fan wrote: > >> On Mon, Oct 12, 2020 at 4:37 PM Amit Langote > >> wrote: > >>> I think we should remove this duplicative logic and return the > >>> ge

Re: Wired if-statement in gen_partprune_steps_internal

2021-03-03 Thread Ryan Lambert
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: not tested Spec compliant: not tested Documentation:not tested The original patch still applies and passes make installcheck-world. An

Re: Wired if-statement in gen_partprune_steps_internal

2020-10-20 Thread Amit Langote
Hi Andy, On Tue, Oct 20, 2020 at 4:05 PM Andy Fan wrote: > On Wed, Oct 14, 2020 at 11:26 AM Andy Fan wrote: >> On Mon, Oct 12, 2020 at 4:37 PM Amit Langote wrote: >>> I think we should remove this duplicative logic and return the >>> generated steps in a list from this function, which the code

Re: Wired if-statement in gen_partprune_steps_internal

2020-10-20 Thread Andy Fan
On Wed, Oct 14, 2020 at 11:26 AM Andy Fan wrote: > > > On Mon, Oct 12, 2020 at 4:37 PM Amit Langote > wrote: > >> Hi, >> >> On Thu, Oct 8, 2020 at 6:56 PM Andy Fan wrote: >> > >> > Hi: >> > >> > I found the following code in gen_partprune_steps_internal, which >> > looks the if-statement to

Re: Wired if-statement in gen_partprune_steps_internal

2020-10-13 Thread Kyotaro Horiguchi
At Wed, 14 Oct 2020 11:26:33 +0800, Andy Fan wrote in > On Mon, Oct 12, 2020 at 4:37 PM Amit Langote > wrote: > > I think we should remove this duplicative logic and return the > > generated steps in a list from this function, which the code in > > gen_partprune_steps_internal() then "combines"

Re: Wired if-statement in gen_partprune_steps_internal

2020-10-13 Thread Andy Fan
On Mon, Oct 12, 2020 at 4:37 PM Amit Langote wrote: > Hi, > > On Thu, Oct 8, 2020 at 6:56 PM Andy Fan wrote: > > > > Hi: > > > > I found the following code in gen_partprune_steps_internal, which > > looks the if-statement to be always true since list_length(results) > 1; > > I added an Assert

Re: Wired if-statement in gen_partprune_steps_internal

2020-10-12 Thread Amit Langote
Hi, On Thu, Oct 8, 2020 at 6:56 PM Andy Fan wrote: > > Hi: > > I found the following code in gen_partprune_steps_internal, which > looks the if-statement to be always true since list_length(results) > 1; > I added an Assert(step_ids != NIL) and all the test cases passed. > if the if-statement

Wired if-statement in gen_partprune_steps_internal

2020-10-08 Thread Andy Fan
Hi: I found the following code in gen_partprune_steps_internal, which looks the if-statement to be always true since list_length(results) > 1; I added an Assert(step_ids != NIL) and all the test cases passed. if the if-statement is always true, shall we remove it to avoid confusion? gen_part