Adjust comments for `IndexOptInfo` to accurately reflect indexcollations's length

Started by Junwang Zhaoabout 1 year ago4 messageshackers
Jump to latest
#1Junwang Zhao
zhjwpku@gmail.com

Hi,

Length of indexcollations[] in `IndexOptInfo` is nkeycolumns, but
struct comments fail to express this, it says:

indexkeys[], indexcollations[] each have ncolumns entries.

So we should polish this description. trivial patch attached.

--
Regards
Junwang Zhao

Attachments:

0001-indexcollations-length-should-be-nkeycolumns.patchapplication/octet-stream; name=0001-indexcollations-length-should-be-nkeycolumns.patchDownload+4-4
#2David Rowley
dgrowleyml@gmail.com
In reply to: Junwang Zhao (#1)
Re: Adjust comments for `IndexOptInfo` to accurately reflect indexcollations's length

On Sun, 23 Nov 2025 at 01:44, Junwang Zhao <zhjwpku@gmail.com> wrote:

Length of indexcollations[] in `IndexOptInfo` is nkeycolumns, but
struct comments fail to express this, it says:

indexkeys[], indexcollations[] each have ncolumns entries.

So we should polish this description. trivial patch attached.

Thanks. I agree with the patch. We should probably mention
canreturn[] too. I can take care of this.

David

#3Junwang Zhao
zhjwpku@gmail.com
In reply to: David Rowley (#2)
Re: Adjust comments for `IndexOptInfo` to accurately reflect indexcollations's length

On Mon, Nov 24, 2025 at 6:52 AM David Rowley <dgrowleyml@gmail.com> wrote:

On Sun, 23 Nov 2025 at 01:44, Junwang Zhao <zhjwpku@gmail.com> wrote:

Length of indexcollations[] in `IndexOptInfo` is nkeycolumns, but
struct comments fail to express this, it says:

indexkeys[], indexcollations[] each have ncolumns entries.

So we should polish this description. trivial patch attached.

Thanks. I agree with the patch. We should probably mention
canreturn[] too. I can take care of this.

Agreed. Thanks for taking care of this.

David

--
Regards
Junwang Zhao

#4David Rowley
dgrowleyml@gmail.com
In reply to: Junwang Zhao (#3)
Re: Adjust comments for `IndexOptInfo` to accurately reflect indexcollations's length

On Mon, 24 Nov 2025 at 14:57, Junwang Zhao <zhjwpku@gmail.com> wrote:

On Mon, Nov 24, 2025 at 6:52 AM David Rowley <dgrowleyml@gmail.com> wrote:

On Sun, 23 Nov 2025 at 01:44, Junwang Zhao <zhjwpku@gmail.com> wrote:
Thanks. I agree with the patch. We should probably mention
canreturn[] too. I can take care of this.

Agreed. Thanks for taking care of this.

Pushed.

David