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.
Most SQL databases support
REGEXP_REPLACE
function (Oracle, Postgres, Vertica, MySQL). Pinot instead supportsREPLACE
, 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
andrtrim
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.