v.24.3Improvement
Add toUInt128OrZero Function and Make Compatibility Aliases Case Insensitive
Add the functiontoUInt128OrZero, which was missed by mistake (the mistake is related to https://github.com/ClickHouse/ClickHouse/pull/945). The compatibility aliasesFROM_UNIXTIMEandDATE_FORMAT(they are not ClickHouse-native and only exist for MySQL compatibility) have been made case insensitive, as expected for SQL-compatibility aliases. #61114 (Alexey Milovidov).
Why it matters
The new functiontoUInt128OrZero addresses the absence of a safe conversion method to UInt128 that returns zero instead of failing, enhancing robustness in data type conversion. Making the MySQL compatibility aliases case insensitive improves SQL compatibility and user experience by aligning with expected SQL behavior.How to use it
UsetoUInt128OrZero like any other conversion function to convert values to UInt128 safely, for example:SELECT toUInt128OrZero(your_column) FROM your_table;The aliases
FROM_UNIXTIME and DATE_FORMAT now accept any case variations automatically and require no special configuration.