Re: Wrong results: NOT IN to anti-join with an upper-level Var in the sub-select's output

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

Re: Wrong results: NOT IN to anti-join with an upper-level Var in the sub-select's output

От:
Rui Zhao <zhaorui126@gmail.com>
Дата:
Вложения:
Hi Tender,

Thanks for looking.  Moved the comment ahead of the test and left the one
inside the if alone, as you suggested; v2 attached.  make check is still green
and the test still fails without the code change.

Just to be clear about what the check costs us: nothing that works today.
expr_is_nonnullable() already declines upper-level Vars, so the only way the
fallback was reaching one was by matching it against a local Var of an
unrelated relation -- there was never a correct conversion there to lose.  And
proving an upper-level output non-null would take the outer query's range
table, which query_outputs_are_not_nullable() isn't given, so that would want a
different mechanism rather than a relaxation of this test.

Thanks,
Rui

Re: Wrong results: NOT IN to anti-join with an upper-level Var in the sub-select's output

От:
Richard Guo <guofenglinux@gmail.com>
Дата:
On Sat, Aug 1, 2026 at 12:26 AM Rui Zhao  wrote:
> Thanks for looking.  Moved the comment ahead of the test and left the one
> inside the if alone, as you suggested; v2 attached.  make check is still green
> and the test still fails without the code change.

Thanks for the report and the patch!

The patch LGTM, except that the comment is overly verbose.  Also I'd
prefer to reuse existing tables instead of creating new ones in the
test case.

I've made some tweaks and then pushed the patch.

- Richard


FAQ