On Tue, Jan 19, 2021 at 12:00 PM Zhihong Yu <z...@yugabyte.com> wrote:
> +               if (mapped_partkey_attnums[i] == pk_attnums[j])
> +               {
> +                   partkey_vals[i] = pk_vals[j];
> +                   partkey_isnull[i] = pk_nulls[j] == 'n' ? true : false;
> +                   i++;
> +                   break;
>
> The way counter (i) is incremented is out of my expectation.
> In the rare case, where some i doesn't have corresponding pk_attnums[j], 
> wouldn't there be a dead loop ?
>
> I think the goal of adding the assertion should be not loop infinitely even 
> if the invariant is not satisfied.
>
> I guess a counter other than i would be better for this purpose.

I have done that in v3.  Thanks.

-- 
Amit Langote
EDB: http://www.enterprisedb.com


Reply via email to