StarRocks / starrocks

The world's fastest open query engine for sub-second analytics both on and off the data lakehouse. With the flexibility to support nearly any scenario, StarRocks provides best-in-class performance for multi-dimensional analytics, real-time analytics, and ad-hoc queries. A Linux Foundation project.
https://starrocks.io
Apache License 2.0
9.06k stars 1.82k forks source link

Suport trino strpos(string, substring, instance) function #52604

Open LZGH opened 2 weeks ago

LZGH commented 2 weeks ago

Feature request

Is your feature request related to a problem? Please describe.

Suport trino strpos(string, substring, instance) function

Returns the position of the N-th instance of substring in string. When instance is a negative number the search will start from the end of string. Positions start with 1. If not found, 0 is returned.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

wangsimo0 commented 2 weeks ago

thanks! it will be a good enhancement for the strpos function. the third parameter can be an optional parameter that default to 1, in order to be compatible with the current function.