Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMWe0-002o8u-Kn for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Jun 2024 17:41:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sMWdz-005jes-0U for pgsql-hackers@arkaria.postgresql.org; Wed, 26 Jun 2024 17:41:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMWdy-005jej-Mb for pgsql-hackers@lists.postgresql.org; Wed, 26 Jun 2024 17:41:19 +0000 Received: from mail.nataraj.su ([168.119.121.177]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sMWdw-003gUl-Lc for pgsql-hackers@postgresql.org; Wed, 26 Jun 2024 17:41:18 +0000 Received: from thinkpad-pgpro.localnet (unknown [91.203.188.92]) by mail.nataraj.su (Postfix) with ESMTPSA id 7EEF31453B5; Wed, 26 Jun 2024 20:41:14 +0300 (MSK) From: Nikolay Shaplov To: Alexander Korotkov , pgsql-hackers@lists.postgresql.org Cc: Andrei Lepikhov , jian he , Robert Haas , pgsql-hackers@postgresql.org, Peter Geoghegan , "Finnerty, Jim" , Marcos Pegoraro , teodor@sigaev.ru, Tomas Vondra , Peter Eisentraut , Ranier Vilela , Alena Rybakina Subject: Re: POC, WIP: OR-clause support for indexes Date: Wed, 26 Jun 2024 20:41:13 +0300 Message-ID: <2193851.QkHrqEjB74@thinkpad-pgpro> Organization: Postgres Professional In-Reply-To: <9736220.CDJkKcVGEf@thinkpad-pgpro> References: <567ED6CA.2040504@sigaev.ru> <196b44d5-f4e5-41a0-9a8f-9fbf26a13760@postgrespro.ru> <9736220.CDJkKcVGEf@thinkpad-pgpro> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4991650.8F6SAcFxjW"; micalg="pgp-sha512"; protocol="application/pgp-signature" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --nextPart4991650.8F6SAcFxjW Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8"; protected-headers="v1" From: Nikolay Shaplov Subject: Re: POC, WIP: OR-clause support for indexes Date: Wed, 26 Jun 2024 20:41:13 +0300 Message-ID: <2193851.QkHrqEjB74@thinkpad-pgpro> Organization: Postgres Professional In-Reply-To: <9736220.CDJkKcVGEf@thinkpad-pgpro> MIME-Version: 1.0 =D0=92 =D0=BF=D0=B8=D1=81=D1=8C=D0=BC=D0=B5 =D0=BE=D1=82 =D0=BF=D0=BE=D0=BD= =D0=B5=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D0=B8=D0=BA, 24 =D0=B8=D1=8E=D0=BD=D1= =8F 2024 =D0=B3. 23:51:56 MSK =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0= =B0=D1=82=D0=B5=D0=BB=D1=8C Nikolay=20 Shaplov =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: So, I continue reading the patch. I see there is `entries` variable in the code, that is the list of=20 `RestrictInfo` objects and `entry` that is `OrClauseGroup` object. This naming is quite misguiding (at least for me). `entries` variable name can be used, as we deal only with RestrictInfo=20 entries here. It is kind of "generic" type. Though naming it=20 `restric_info_entry` might make te code more readable. But when we come to an `entry` variable, it is very specific entry, it shou= ld=20 be `OrClauseGroup` entry, not just any entry. So I would suggest to name th= is=20 variable `or_clause_group_entry`, or even `or_clause_group` , so when we me= et=20 this variable in the middle of the code, we can get the idea what we are=20 dealing with, without scrolling code up. Variable naming is very important thing. It can drastically improve (or rui= n)=20 code readability. =3D=3D=3D=3D=3D=3D=3D=3D Also I see some changes in the tests int this patch. There are should be te= sts=20 that check that this new feature works well. And there are test whose behav= ior=20 have been just accidentally affected. I whould suggest to split these tests into two patches, as they should be=20 reviewed in different ways. Functionality tests should be thoroughly checke= d=20 that all stuff we added is properly tested, and affected tests should be ch= ecked=20 that nothing important is not broken. It would be more easy to check if the= se=20 are two different patches. I would also suggest to add to the commit message of affected tests changes= =20 some explanation why this changes does not really breaks anything. This wil= l=20 do the checking more simple. To be continued. =2D-=20 Nikolay Shaplov aka Nataraj =46uzzing Engineer at Postgres Professional Matrix IM: @dhyan:nataraj.su --nextPart4991650.8F6SAcFxjW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part. Content-Transfer-Encoding: 7Bit -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE+sk3ebqQKlezKOi8PMbfuIHAGpgFAmZ8UrkACgkQPMbfuIHA GpjLmQf/Uhzh7eFZTY2IsYCe3d4ZuZjcSXGSXhbuUcDu0dvFpdgitWwb6OLa8ruW 6Dej62nK0Fq5cxJctsAyi5G3EtnPqLxuvkYxPKD8xxtYX9Cc4naYdSy/9u/AT8vQ iYGc7f9j+ga6yl39mFX+WaRRmMNMePMHD7JihYI2yHe3dqrogTZSXIVlMBEmDDtj ITN6Kz9qnll6b5ShZENDdHU3Wg2zV1SVvTaYnIWAMbLmRfKAeswb6225RvW3uFt4 oV8UEH8l3Ljn79wtQ8pQ0webLqhKB/Pxa99h68I2oaGdvSPJBQgQeIESJyq8uUEm Ke1yO9nemP1yDgtCRmv97pjzGejybA== =MzEt -----END PGP SIGNATURE----- --nextPart4991650.8F6SAcFxjW--