Dandandan opened a new pull request, #21377:
URL: https://github.com/apache/datafusion/pull/21377

   ## Summary
   - Pre-parses the replacement template once (`ReplacementTemplate`) to avoid 
re-parsing `$` backreferences on every row
   - When the replacement has no capture group references, uses `Regex::find()` 
instead of captures — leverages the fast DFA/hybrid engine and completely 
avoids the expensive `BoundedBacktracker`
   - When capture groups are needed, uses `captures_read()` with pre-allocated 
`CaptureLocations` to avoid per-row `Captures` allocation, and writes results 
directly into the output buffer
   
   ## Test plan
   - [x] Existing `regexp_replace` unit tests pass
   - [x] ClickBench regexp sqllogictests pass
   - [ ] Benchmark with ClickBench Q28
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to