v.23.5Improvement
bitHammingDistance function now supports String and FixedString data types
bitHammingDistancefunction supportStringandFixedStringdata type. Closes #48827. #49858 (flynn).
Why it matters
This enhancement allows users to calculate the Hamming distance between binary representations of string values directly, expanding the applicability ofbitHammingDistance beyond numeric types. It simplifies operations involving bitwise comparisons of string data, which is useful in tasks like similarity detection or error correction.How to use it
Use thebitHammingDistance function with columns or values of String or FixedString types in your SQL queries, for example:SELECT bitHammingDistance('string1', 'string2')This will compute the bitwise Hamming distance between the two strings.