Skip to content

'if' function not working with Nullable condition. #10846

@LittleMaverick

Description

@LittleMaverick

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)

Metadata

Metadata

Assignees

Labels

bugConfirmed user-visible misbehaviour in official releasecomp-datatype-wrapperType modifiers/wrappers (Nullable, LowCardinality, etc.).

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions