Re: Bug in row_number() optimization

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Bug in row_number() optimization
Дата
Msg-id CAMbWs4-8UnEWbb8t-mqD0oSSUF_6eK7++BkzaEED8kCvN7g90Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Bug in row_number() optimization  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: Bug in row_number() optimization  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers

On Fri, Nov 25, 2022 at 7:34 AM David Rowley <dgrowleyml@gmail.com> wrote:
Since upper-level WindowAggs cannot reference values calculated in
some lower-level WindowAgg, why can't we just NULLify the pointers
instead? See attached.
 
Verified the problem is fixed with this patch.  I'm not familiar with
the WindowAgg execution codes.  As far as I understand, this patch works
because we set ecxt_aggnulls to true, making it a NULL value.  And the
top-level WindowAgg node's "Filter" is strict so that it can filter out
all the tuples that don't match the intermediate WindowAgg node's run
condition.  So I find the comments about "WindowAggs above us cannot
reference the result of another WindowAgg" confusing.  But maybe I'm
missing something.

Thanks
Richard

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Smith
Дата:
Сообщение: Re: Perform streaming logical transactions by background workers and parallel apply
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: Patch: Global Unique Index