-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: incorrect grouping of array with NULL #44079
Copy link
Copy link
Closed
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-sqlsmith
Description
SELECT
a, a IS NULL AS isnull
FROM
(
VALUES
(NULL),
((NULL::TIMESTAMP || NULL::TIMESTAMP[]))
)
AS t (a);
SELECT
*
FROM
(
VALUES
(NULL),
((NULL::TIMESTAMP || NULL::TIMESTAMP[]))
)
AS t (a)
GROUP BY
a;
In postgres:
a | isnull
--------+--------
| t
{NULL} | f
(2 rows)
a
--------
{NULL}
(2 rows)
Cockroach:
a | isnull
--------+--------
| t
{NULL} | f
(2 rows)
a
---
(1 row)
It seems that we are incorrectly grouping an array with a null with a regular null.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.O-sqlsmith