-
Notifications
You must be signed in to change notification settings - Fork 8.3k
'if' function not working with Nullable condition. #10846
Copy link
Copy link
Closed
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-datatype-wrapperType modifiers/wrappers (Nullable, LowCardinality, etc.).Type modifiers/wrappers (Nullable, LowCardinality, etc.).
Description
I try to execute such query:
SELECT if(isFinite(toUInt64OrZero(toNullable('123'))), 1, 0)
But it throws an exception:
Code: 44, e.displayText() = DB::Exception: Illegal column Const(Nullable(UInt8)) of first argument of function if. Must be ColumnUInt8 or ColumnConstUInt8. (version 20.3.8.53 (official build))
SELECT toTypeName(isFinite(toUInt64OrZero(toNullable('123')))) - Nullable(UInt8)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugConfirmed user-visible misbehaviour in official releaseConfirmed user-visible misbehaviour in official releasecomp-datatype-wrapperType modifiers/wrappers (Nullable, LowCardinality, etc.).Type modifiers/wrappers (Nullable, LowCardinality, etc.).