Use fancy-regex instead of regex to support more patterns
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Is your feature request related to a problem or challenge?
[fancy-regex](https://github.com/fancy-regex/fancy-regex) is a crate that aims to be a drop in replacement for the standard library [regex](https://github.com/rust-lang/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_
Contributor guide
Research direction
Start by locating DataFusion’s built-in regex UDF implementations and reading how they currently use the standard regex crate. Compare the proposed optional integration approaches, then define completion as supporting advanced regex patterns without breaking existing UDF behavior, with coverage for the selected design.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100