v.19.1Improvements

Allowed to Use Enums as Integers Inside If Function

Allowed to use Enums as integers inside if function. #3875 (Ivan)
Allowed to use Enum types as integers inside the if function in ClickHouse.

Why it matters

This feature enables more flexible usage of Enum values by allowing them to be treated as integers within conditional expressions. This solves the limitation where Enum types could not be directly used as integer values in the if function, enhancing query expressiveness and simplifying code.

How to use it

Simply use Enum values within the if function as you would with integers. For example:
SELECT if(some_enum_column = EnumValue, 1, 0) FROM table