Re: BUG #17067: FailedAssertion at castNodeImpl

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: BUG #17067: FailedAssertion at castNodeImpl
Дата
Msg-id CAApHDvq0sqRfWCGj2JfZDs9DEiDfaBs=067Err3=EK09ct8bjg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #17067: FailedAssertion at castNodeImpl  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-bugs
On Mon, 21 Jun 2021 at 21:47, David Rowley <dgrowleyml@gmail.com> wrote:
> I'm quite surprised that we don't have a test that picks this up.

I was just looking at [1], line 1858. I see there is a test that runs
through that code, it's just that because the previous step sorts the
List of IntLists by the length of the IntList, that the IntList with 0
items is the initial list.  linitial_node() does allow NULL, so no
failure.

The test in question is this one in groupingsets.sql

select a, b, c
from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c)
group by distinct rollup(a, b), rollup(a, c)
order by a, b, c;

Changing it to the following triggers the failure.

select a, b, c
from (values (1, 2, 3), (4, null, 6), (7, 8, 9)) as t (a, b, c)
group by distinct rollup(a, b), rollup(a, c), grouping sets (a)
order by a, b, c;

David

[1] https://coverage.postgresql.org/src/backend/parser/parse_agg.c.gcov.html



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: BUG #17067: FailedAssertion at castNodeImpl
Следующее
От: Richard Guo
Дата:
Сообщение: Re: BUG #17067: FailedAssertion at castNodeImpl