v.18.16Improvement
Support for Variable Arguments and Tuples in Hash Functions
ThecityHash64,farmHash64,metroHash64,sipHash64,halfMD5,murmurHash2_32,murmurHash2_64,murmurHash3_32, andmurmurHash3_64functions now work for any number of arguments and for arguments in the form of tuples. #3451 #3519
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 likecityHash64 or murmurHash3_64. For example:SELECT cityHash64('arg1', 'arg2', ('tuple1', 'tuple2'))
FROM tableThis change does not require special enabling; it is applied automatically after updating to the new version.