-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Unexpected return type from equals: Grouping sets and predicate pushdown #63349
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
fuzzProblem found by one of the fuzzersProblem found by one of the fuzzersnot plannedKnown issue, no plans to fix it currenltyKnown issue, no plans to fix it currenlty
Description
Repro:
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, allow_experimental_analyzer = false;
SELECT * FROM ( SELECT day_, if(type_1 = '', 'all', type_1) AS type_1 FROM ( SELECT day_, type_1 FROM test_grouping_sets_predicate GROUP BY GROUPING SETS ( (day_, type_1), (day_)) ) AS t ) WHERE day_ = '2023-01-05';
-
With the old analyzer:
2024.05.03 16:46:42.584778 [ 355222 ] {78d2f191-2030-4d8b-a252-5956029e9ebc} <Fatal> : Logical error: 'Unexpected return type from equals. Expected Nullable. Got UInt8'. -
With the new analyzer:
Code: 44. DB::Exception: Illegal column for DataTypeNullable. (ILLEGAL_COLUMN) -
With new analyzer but setting
group_by_use_nulls=false: Works fine -
With new analyzer but removing the condition
WHERE day_ = '2023-01-05': Works fine
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fuzzProblem found by one of the fuzzersProblem found by one of the fuzzersnot plannedKnown issue, no plans to fix it currenltyKnown issue, no plans to fix it currenlty