Repository navigation
Commit 1d24a24
Fix tuple comparison type inference returning
When comparing tuples where one element comparison involves `Nothing` type
(e.g., `equals(Tuple(Nullable(UInt16), Nullable(String)), Nullable(Tuple(Nullable(Nothing), String)))`),
the type inference for the comparison result was returning `Nullable(Nothing)` or bare `Nothing`.
However, comparison functions always produce `UInt8` results at execution time (wrapped in
`Nullable` when needed), so the actual column type was `Nullable(UInt8)`.
This type mismatch between the inferred header type and actual data type caused an
`assertTypeEquality` exception in `MergingSortedAlgorithm` when merging sorted streams
from `GROUPING SETS`, because `MergedData` was initialized from the header with
`ColumnNullable(ColumnNothing, ...)` but the actual data had `ColumnNullable(ColumnUInt8, ...)`.
The fix ensures that tuple comparison type inference always returns `Nullable(UInt8)` instead
of `Nullable(Nothing)` or `Nothing` when element comparisons produce null/nothing results,
matching the actual execution behavior.
https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=305cb0a8d1e26c4db22fec8e634121fca6c9e358&name_0=MasterCI&name_1=AST%20fuzzer%20%28amd_msan%29
Co-Authored-By: Claude Opus 4.6 <[email protected]>Nullable(Nothing) instead of Nullable(UInt8)
1 parent e090ba2 commit 1d24a24
3 files changed
Lines changed: 20 additions & 2 deletions
File tree
- src/Functions
- tests/queries/0_stateless
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1298 | 1298 | | |
1299 | 1299 | | |
1300 | 1300 | | |
1301 | | - | |
| 1301 | + | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | 1304 | | |
1305 | 1305 | | |
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
1309 | | - | |
| 1309 | + | |
1310 | 1310 | | |
1311 | 1311 | | |
1312 | 1312 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments