v.23.12Improvement

Allow IPv6 to UInt128 Conversion and Binary Arithmetic

Allow IPv6 to UInt128 conversion and binary arithmetic. #57707 (Yakov Olkhovskiy).
Allows conversion between IPv6 addresses and UInt128 numeric type, enabling binary arithmetic operations on IPv6 addresses in ClickHouse.

Why it matters

This feature resolves the limitation of handling IPv6 addresses by allowing their conversion to the UInt128 type, which supports arithmetic operations. It provides users the ability to perform efficient binary calculations, comparisons, and transformations on IPv6 addresses directly within ClickHouse queries.

How to use it

Users can convert IPv6 addresses to UInt128 using the appropriate cast functions or expressions, allowing them to leverage binary arithmetic operators on converted values. This enables queries like addition, subtraction, and other numeric operations on IPv6 addresses represented as UInt128.