v.19.5Improvement
Rename Trigramdistance Function to Ngramdistance and Add More Functions with Caseinsensitive and UTF
RenametrigramDistancefunction tongramDistanceand add more functions withCaseInsensitiveandUTF. #4602 (Danila Kutenin)
Why it matters
The rename fromtrigramDistance 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.