v.25.10New Feature

New conv function for converting numbers between

A new conv function for converting numbers between bases, currently supports bases from 2-36. #83058 (hp).
Introduces a new conv function in ClickHouse for converting numbers between bases ranging from 2 to 36.

Why it matters

This feature solves the problem of base conversion directly within ClickHouse queries, enabling users to convert numerical representations between different bases without external tools or complex workarounds. It adds flexibility for data transformation and analysis involving various numeral systems.

How to use it

Use the conv function by specifying the number as a string, the source base, and the target base as arguments, for example:

sql<br>SELECT conv('1a', 16, 10) AS decimal_value;<br>
This converts the hexadecimal number '1a' to its decimal equivalent.