Skip to content

Logical error 'Unexpected return type from equals' in group_by_use_nulls + GROUPING SETS #60538

@vdimir

Description

@vdimir

https://fiddle.clickhouse.com/dba51b74-4843-46e5-abbc-8cb5d0310373

And it works on latest, though. But broken on head

DROP TABLE IF EXISTS test_grouping_sets_predicate;

CREATE TABLE test_grouping_sets_predicate
(
    day_ Date,
    type_1 String
)
ENGINE=MergeTree
ORDER BY day_;

INSERT INTO test_grouping_sets_predicate SELECT toDate('2023-01-05') AS day_, 'hello, world' FROM numbers (10);

SET group_by_use_nulls = true;

SELECT *
FROM
( SELECT
    day_,
    type_1
FROM test_grouping_sets_predicate
GROUP BY
    GROUPING SETS ( (day_, type_1), (day_) )
)
WHERE day_ = '2023-01-05';
Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Unexpected return type from equals. Expected Nullable. Got UInt8: while executing 'FUNCTION equals(day_ : 0, '2023-01-05' :: 1) -> equals(day_, '2023-01-05') Nullable(UInt8) : 3'. (LOGICAL_ERROR)

Metadata

Metadata

Assignees

Labels

fuzzProblem found by one of the fuzzerstestingSpecial issue with list of bugs found by CI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions