-
Notifications
You must be signed in to change notification settings - Fork 8.3k
A few rewrite rules for regexp functions #81981
Copy link
Copy link
Closed
Labels
performancewarmup taskThe task for new ClickHouse team members. Low risk, moderate complexity, no urgency.The task for new ClickHouse team members. Low risk, moderate complexity, no urgency.
Description
Company or project name
ClickHouse
Describe the situation
REGEXP_REPLACE can be optimized
- If a regular expression starts with
^or ends with an unescaped$, rewritereplaceRegexpAllwithreplaceRegexpOne. - If a
replaceRegexpOnefunction has a replacement of nothing other than\1, or\0and no subpatterns in the regexp, rewrite it withextract. - If an
extractfunction has a regexp starting with^.*or ending with an unescaped.*$, remove this prefix and/or suffix.
How to reproduce
.
Expected performance
No response
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
performancewarmup taskThe task for new ClickHouse team members. Low risk, moderate complexity, no urgency.The task for new ClickHouse team members. Low risk, moderate complexity, no urgency.