v.19.6Improvements

Added Support for Non-constant and Negative Size and Length Arguments for Function Substringutf8

Added support for non-constant and negative size and length arguments for function substringUTF8. #4989 (alexey-milovidov)
Added support for non-constant and negative size and length arguments in the substringUTF8 function.

Why it matters

This feature allows users to dynamically specify the size and length parameters for substringUTF8 instead of requiring constant values, and also supports negative values for these parameters. This flexibility enables more versatile string manipulation in UTF-8 encoded data, improving query expressiveness and usability.

How to use it

Users can now pass non-constant expressions or negative integers as the size and length arguments to the substringUTF8 function within their queries, like:

SELECT substringUTF8('example', start_position, length) FROM table;

where start_position and length can be dynamic expressions or negative values.