Skip to content

Query with CASE operator unexpectedly results in "Column must be in the GROUP BY list" error #2813

@mrigger

Description

@mrigger

Consider the following statements:

CREATE TABLE T0(c0 INT);
CREATE TABLE T1(c0 BOOL);
INSERT INTO T0 VALUES (0);
SELECT * FROM T0, T1 WHERE (CASE T1.c0 WHEN T1.c0 THEN T1.c0 END); -- Column "T1.C0" must be in the GROUP BY list

Unexpectedly, the query results in an error Column "T1.C0" must be in the GROUP BY list. I found this based on commit 309fe5a.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions