Re: Table AM modifications to accept column projection lists

Zhihong Yu <zyu@yugabyte.com>

From: Zhihong Yu <zyu@yugabyte.com>
To: Jacob Champion <pchampion@vmware.com>
Cc: "pryzby@telsasoft.com" <pryzby@telsasoft.com>, "soumyadeep2007@gmail.com" <soumyadeep2007@gmail.com>, "hlinnaka@iki.fi" <hlinnaka@iki.fi>, "sawada.mshk@gmail.com" <sawada.mshk@gmail.com>, "Ashwin Agrawal (Pivotal)" <aagrawal@pivotal.io>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, "melanieplageman@gmail.com" <melanieplageman@gmail.com>
Date: 2021-03-02T18:35:06Z
Lists: pgsql-hackers
Hi,

+   /* Make sure the the new slot is not dependent on the original tuple */

There is duplicate 'the'.

For neededColumnContextWalker(),

+       else if(var->varattno == 0) {

I think the if following the else is not needed - I assume var->varattno
wouldn't be negative.
Similar comment for extract_scan_columns().

+   while ((col = bms_next_member(parent_cols, col)) >= 0)
+   {
+       Var *var = (Var *) list_nth(translated_vars, col - 1);

If col is 0, do you still want to call list_nth() ?

Cheers

On Tue, Mar 2, 2021 at 9:10 AM Jacob Champion <pchampion@vmware.com> wrote:

> On Mon, 2021-03-01 at 23:13 +0000, Jacob Champion wrote:
> > On Mon, 2021-03-01 at 16:59 -0600, Justin Pryzby wrote:
> > > Why is this removed ?
> >
> > Mm, both of those analyze.c changes seem suspect. Possibly a mismerge
> > from the zedstore branch; let me double-check.
> >
> > > its (possessive) not it's ("it is")
> >
> > Thanks, I'll fix this at the same time.
>
> Both fixed in v3; thanks for the catch!
>
> --Jacob
>