v.23.7New Feature
Added hasSubsequence functions for string matching
Added newhasSubsequence(+CaseInsensitiveandUTF8versions) functions to match subsequences in strings. #52050 (Dmitry Kardymon).
Why it matters
These functions address the need for more flexible string matching capabilities in ClickHouse, allowing users to efficiently identify whether a string contains a given subsequence, with options for case insensitivity and proper UTF-8 handling.How to use it
Use thehasSubsequence function in your SQL queries to check for the presence of a subsequence within a string. For case-insensitive matching, use hasSubsequenceCaseInsensitive. For UTF-8 aware matching, use hasSubsequenceUTF8 or its case-insensitive variant. Example usage: SELECT hasSubsequence(column_name, 'subseq') FROM table_name;