v.19.5Improvement

Rename Trigramdistance Function to Ngramdistance and Add More Functions with Caseinsensitive and UTF

Rename trigramDistance function to ngramDistance and add more functions with CaseInsensitive and UTF. #4602 (Danila Kutenin)
Renamed the trigramDistance function to ngramDistance and introduced additional functions supporting CaseInsensitive and UTF options for more flexible and accurate string similarity calculations.

Why it matters

The rename from trigramDistance to ngramDistance better reflects the generality of the function beyond just trigrams. Adding CaseInsensitive and UTF variants solves the problem of limited case and encoding support in string similarity functions, enabling users to perform more accurate and versatile n-gram based comparisons, especially with Unicode and case variations.

How to use it

Use the newly named <code>ngramDistance</code> function in place of the old <code>trigramDistance</code>. For case-insensitive comparisons, use the <code>CaseInsensitive</code> variants of the functions. To handle UTF-8 encoded strings properly, use the <code>UTF</code> variants. Simply call these functions in your SQL queries as with other string functions.