apache / pinot

Apache Pinot - A realtime distributed OLAP datastore
https://pinot.apache.org/
Apache License 2.0
5.5k stars 1.29k forks source link

Support REGEXP_REPLACE #9079

Closed gortiz closed 2 years ago

gortiz commented 2 years ago

Most SQL databases support REGEXP_REPLACE function (Oracle, Postgres, Vertica, MySQL). Pinot instead supports REPLACE, which just looks for exact string matches and replace them with another simple string.

It shouldn't be very difficult to support this operation in Pinot. Current implementation of ltrim and rtrim already uses Java regex. The main difference is that, for performance reasons, the pattern should be stored somewhere in the AST to be compiled only once.

gortiz commented 2 years ago

IMHO this ticket should be labeled as beginner-task

vvivekiyer commented 2 years ago

I'll pick this up.

siddharthteotia commented 2 years ago

Completed with PR https://github.com/apache/pinot/pull/9123