Re: Add red-black tree missing comparison searches

2022-07-08 Thread Alexander Korotkov
On Thu, Jul 7, 2022 at 1:43 PM Alexander Korotkov wrote: > On Thu, Jul 7, 2022 at 2:16 AM Steve Chavez wrote: > > Thanks Alexander! > > > > wrt to the new patch. I think the following comment is misleading since > > keyDeleted can be true or false: > > > > + /* switch equal_match to false so we

Re: Add red-black tree missing comparison searches

2022-07-07 Thread Alexander Korotkov
On Thu, Jul 7, 2022 at 2:16 AM Steve Chavez wrote: > Thanks Alexander! > > wrt to the new patch. I think the following comment is misleading since > keyDeleted can be true or false: > > + /* switch equal_match to false so we only find greater matches now */ > + node = (IntRBTreeNode *) rbt_find_g

Fwd: Add red-black tree missing comparison searches

2022-07-06 Thread Steve Chavez
-- Forwarded message - From: Steve Chavez Date: Wed, 6 Jul 2022 at 18:14 Subject: Re: Add red-black tree missing comparison searches To: Alexander Korotkov Thanks Alexander! wrt to the new patch. I think the following comment is misleading since keyDeleted can be true or false

Re: Add red-black tree missing comparison searches

2022-07-06 Thread Alexander Korotkov
Hi, Steve! On Sat, Jul 2, 2022 at 10:38 PM Steve Chavez wrote: > > But I think we can support strict inequalities too (e.g. > less and greater without equals). Could you please make it a bool > argument equal_matches? > > Sure, an argument is a good idea to keep the code shorter. > > > Could you

Re: Add red-black tree missing comparison searches

2022-07-02 Thread Steve Chavez
Hey Alexander, > But I think we can support strict inequalities too (e.g. less and greater without equals). Could you please make it a bool argument equal_matches? Sure, an argument is a good idea to keep the code shorter. > Could you please extract this change as a separate patch. Done! On T

Re: Add red-black tree missing comparison searches

2022-06-30 Thread Alexander Korotkov
Hi, Steve! Thank you for working on this. On Thu, Jun 30, 2022 at 7:51 PM Steve Chavez wrote: > Currently the red-black tree implementation only has an equality search. > Other extensions might need other comparison searches, like less-or-equal or > greater-or-equal. For example OrioleDB defin

Re: Add red-black tree missing comparison searches

2022-06-30 Thread Steve Chavez
Yes, I've already added it here: https://commitfest.postgresql.org/38/3742/ Thanks! On Thu, 30 Jun 2022 at 12:09, Greg Stark wrote: > Please add this to the commitfest at > https://commitfest.postgresql.org/38/ so it doesn't get missed. The > commitfest starts imminently so best add it today. >

Re: Add red-black tree missing comparison searches

2022-06-30 Thread Greg Stark
Please add this to the commitfest at https://commitfest.postgresql.org/38/ so it doesn't get missed. The commitfest starts imminently so best add it today.

Add red-black tree missing comparison searches

2022-06-30 Thread Steve Chavez
23:46:38 -0500 Subject: [PATCH] Add red-black tree missing comparison searches * Added find great/less or equal * Change rbtree sentinel to C99 designator --- src/backend/lib/rbtree.c | 60 +++- src/include/lib/rbtree.h | 2 + src/test/modules/test_r