Обсуждение: Mention TABLEFUNC to make comment consistent with code

Поиск
Список
Период
Сортировка

Mention TABLEFUNC to make comment consistent with code

От
Steve Lau
Дата:

Hi hackers! This patch updates the comment flatten_join_alias_vars() that explains why it can be skipped when the expression to preprocess_expression() is of specific types, we now mention TABLEFUNC in the comment so that comment and code stay consistent.


Regards,

steve

 

 

Вложения

Re: Mention TABLEFUNC to make comment consistent with code

От
jian he
Дата:
On Thu, Nov 27, 2025 at 10:44 PM Steve Lau <stevelauc@outlook.com> wrote:
>
> Hi hackers! This patch updates the comment flatten_join_alias_vars() that explains why it can be skipped when the
expressionto preprocess_expression() is of specific types, we now mention TABLEFUNC in the comment so that comment and
codestay consistent. 
>
>

hi.

look at the json_table (TABLEFUNC) code, your comments change seems good.

in transformJsonTable, we have:
``
is_lateral = jt->lateral || contain_vars_of_level((Node *) tf, 0);
``

so overall, I am ok with the comments:
"""
But we can skip this in non-lateral RTE functions, VALUES lists,
TABLESAMPLE, and TABLEFUNC clauses, since they can't contain any Vars of the
current query level.
"""

--
jian
https://www.enterprisedb.com