Skip to content

Unexpected return type from concat. Expected String. Got Nullable(String) #87016

@devcrafter

Description

@devcrafter

Describe the bug

Setting join_use_nulls=true triggers the exception for the query

How to reproduce

SELECT DISTINCT *                                                                                                                                                                                                                               
FROM numbers(2) AS n1, numbers(3) AS n2                                                                                                                                                                                                         
RIGHT JOIN numbers(4) AS n3 ON n2.number = n3.number                                                                                                                                                                                            
ORDER BY                                                                                                                                                                                                                                        
    toUInt64(concat(0 IS NULL, materialize(12) - 0, toNullable(1) IS NULL, concat(intDiv(materialize(0), assumeNotNull(1)), *))) ASC,                                                                                                           
    1 DESC NULLS FIRST,                                                                                                                                                                                                                         
    n1.number DESC NULLS FIRST                                                                                                                                                                                                                  
SETTINGS join_use_nulls = true

https://fiddle.clickhouse.com/77d462cd-b263-4b30-a291-7948869e3b07

Error message and/or stacktrace

https://s3.amazonaws.com/clickhouse-test-reports/PRs/86895/0b1f8ba7e4ca043ae582238dbb3ad56682140889//ast_fuzzer_arm_asan/fatal.log

Metadata

Metadata

Assignees

Labels

analyzerIssues and pull-requests related to new analyzerbugConfirmed user-visible misbehaviour in official releasefuzzProblem found by one of the fuzzers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions