Skip to content

Align regexp_like, ~, and ~* implementations #17838

@pepijnve

Description

@pepijnve

Is your feature request related to a problem or challenge?

The implementation of regexp_like is less optimised compared to the ~ and ~* operators. In particular, the operators have optimised paths for array ~ scalar while regexp_like will expand scalars to arrays. The consequence is that the function will always use the regexp_is_match kernel while the operators can make use of regexp_is_match_scalar. This in turn results in regex_like(column, 'pattern') having different performance characteristics compared to column ~ pattern which can be a pitfall.

Describe the solution you'd like

Try to align the two implementations as well as possible so there is no practical difference between the two.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions