v.18.16Improvement

Support for Variable Arguments and Tuples in Hash Functions

The cityHash64, farmHash64, metroHash64, sipHash64, halfMD5, murmurHash2_32, murmurHash2_64, murmurHash3_32, and murmurHash3_64 functions now work for any number of arguments and for arguments in the form of tuples. #3451 #3519
The cityHash64, farmHash64, metroHash64, sipHash64, halfMD5, murmurHash2_32, murmurHash2_64, murmurHash3_32, and murmurHash3_64 functions have been enhanced to accept any number of arguments, including arguments in the form of tuples.

Why it matters

Previously, these hash functions were limited in the number and type of arguments they could process, restricting their flexibility in complex data hashing scenarios. With this update, users can hash multiple values or tuple-structured data in a single function call, simplifying query expressions and allowing more effective and versatile use of hashing functions in data processing.

How to use it

To use the updated hash functions, simply pass multiple arguments or a tuple of values to any of the supported functions like cityHash64 or murmurHash3_64. For example:

SELECT cityHash64('arg1', 'arg2', ('tuple1', 'tuple2'))
FROM table


This change does not require special enabling; it is applied automatically after updating to the new version.