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

Support trino regexp_count(string, pattern) function #52603

Open LZGH opened 2 weeks ago

LZGH commented 2 weeks ago

Feature request

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

Support trino regexp_count(string, pattern) function

Returns the number of occurrence of pattern in string: SELECT regexp_count('1a 2b 14m', '\s[a-z]+\s'); -- 3

Describe the solution you'd like

Describe alternatives you've considered

Additional context

wangsimo0 commented 2 weeks ago

in snowflake and oralce there are more optional parameters in regexp_count, we can support the basic version as trino did first.

Lrabbit125 commented 1 week ago

I came across this issue while working on #49575, which is also related to Trino. I would be appreaciate the opportunity to take responsibility for it. Could you assign it to me? @wangsimo0 @kateshaowanjou @kevincai @gengjun-git