v.21.6New Feature
Make Big Integers Production Ready with Enhanced Support for Data Types and Functions
Make big integers production ready. Add support forUInt128data type. Fix known issues with theDecimal256data type. Support big integers in dictionaries. Supportgcd/lcmfunctions for big integers. Support big integers in array search and conditional functions. SupportLowCardinality(UUID). Support big integers ingenerateRandomtable function andclickhouse-obfuscator. Fix error with returningUUIDfrom scalar subqueries. This fixes #7834. This fixes #23936. This fixes #4176. This fixes #24018. Backward incompatible change: values ofUUIDtype cannot be compared with integer. For example, instead of writinguuid != 0typeuuid != '00000000-0000-0000-0000-000000000000'. #23631 (alexey-milovidov).
Why it matters
This feature addresses the need for robust, high-precision integer support in ClickHouse by making big integers production ready. It resolves known bugs and limitations with big integer types likeUInt128 and Decimal256, improves their integration across various functionalities and data structures, and ensures compatibility and correctness, particularly with UUID handling. The update also clarifies type comparison rules, which prevents subtle bugs in user queries.How to use it
Users can start utilizingUInt128 data type directly in their table schemas and queries. Big integers are fully supported in dictionaries, array functions, and conditional expressions without additional configuration. The gcd and lcm functions can now be applied to big integer types. Note the backward incompatible change: comparisons between UUID and integers are disallowed, so write comparisons explicitly with the UUID string literal, for example, uuid != '00000000-0000-0000-0000-000000000000' instead of uuid != 0.