From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | cyg0810(at)gmail(dot)com, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org> |
Subject: | Re: BUG #17067: FailedAssertion at castNodeImpl |
Date: | 2021-06-21 10:09:30 |
Message-ID: | CAApHDvq0sqRfWCGj2JfZDs9DEiDfaBs=067Err3=EK09ct8bjg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Mon, 21 Jun 2021 at 21:47, David Rowley <dgrowleyml(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Guo | 2021-06-21 10:09:57 | Re: BUG #17067: FailedAssertion at castNodeImpl |
Previous Message | David Rowley | 2021-06-21 09:47:49 | Re: BUG #17067: FailedAssertion at castNodeImpl |