Skip to content

Use fancy-regex instead of regex to support more patterns #18778

@shivbhatia10

Description

@shivbhatia10

Is your feature request related to a problem or challenge?

fancy-regex is a crate that aims to be a drop in replacement for the standard library regex crate, while supporting advanced features like backtracking and look-around. It aims to delegate to the standard library implementation efficiently in cases where the advanced features are not needed.

Describe the solution you'd like

It would be great if we could optionally use this library in DataFusion's built in regex UDFs.

Describe alternatives you've considered

  • Having two sets of UDFs for each regexp UDF, something like RegexpReplaceFunc and RegexpReplaceFancyFunc for example.
  • Adding a boolean field to these UDFs like is_fancy
  • Using a compiler feature flag to turn these on across all UDFs

I think the second option is probably the easiest and least intrusive.

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