Skip to content

Function X expects N argument to have Y type but receives Nullable(Y) after running IfChainToMultiIf pass. #62062

@azat

Description

@azat

CI: https://s3.amazonaws.com/clickhouse-test-reports/61997/ced095394b6fb6d50ed8b6834bd5911ad4702c6e/stateless_tests__ubsan__[1_2].html

SELECT if((number % NULL) = -2147483648, NULL, if(toInt64(toInt64(now64(if((number % NULL) = -2147483648, NULL, if(toInt64(now64(toInt64(9223372036854775807, now64(NULL + NULL)), NULL + NULL)) = (number % NULL), nan, toFloat64(number))), toInt64(9223372036854775807, toInt64(9223372036854775807, now64(NULL + NULL)), now64(NULL + NULL)), NULL + NULL)), now64(toInt64(9223372036854775807, toInt64(0, now64(NULL + NULL)), now64(NULL + NULL)), NULL + NULL)) = (number % NULL), nan, toFloat64(number))) AS x
FROM system.numbers
LIMIT 3
SETTINGS optimize_if_chain_to_multiif = 1

Elapsed: 0.002 sec.

Received exception:
Code: 49. DB::Exception: Function now64(multiIf((__table1.number % _CAST(NULL, 'Nullable(Nothing)')) = -2147483648, _CAST(NULL, 'Nullable(Nothing)'), _CAST(NULL, 'Nullable(Nothing)') = (__table1.number % _CAST(NULL, 'Nullable(Nothing)')), nan, toFloat64(__table1.number)), _CAST(NULL, 'Nullable(Nothing)'), _CAST(NULL, 'Nullable(Nothing)')) expects 1 argument to have Float64 type but receives Nullable(Float64) after running IfChainToMultiIf pass. (LOGICAL_ERROR)

Metadata

Metadata

Assignees

No one assigned

    Labels

    fuzzProblem 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