Repository navigation
Extend the regexp anchored-literal fast-path to escaped non-alphanumerics - #117331
Conversation
…rics RE2 resolves a backslash before any non-alphanumeric character to that character itself, so such an escape is part of a literal. The analysis only accepted a fixed list of escaped metacharacters, which left `RE2::QuoteMeta` output on the re2 path: it escapes every non-alphanumeric byte, so a needle containing a space, `%` or `:` was not recognized as an anchored literal.
|
Workflow [PR], commit [f37ac84] Summary: ❌
AI ReviewSummaryThis PR broadens the anchored-literal regexp fast path to accept RE2-style escapes of non-alphanumeric bytes, so patterns such as Final VerdictStatus: ✅ Approve LLVM Coverage Report |
|
📊 Cloud Performance Report ✅ AI verdict: no significant changes detected. K_source=6 K_base=30 flagged=0/65 clickbench🟢 No significant changes tpch_adapted_1_official🟢 No significant changes Debug info
|
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units7 translation units recompiled, 6 s compile time in total, 7 of them have a recent master baseline. |
Canonicalize coverage paths, fail selection on stale or incompatible snapshots, and replace broad admission with precise coverage evidence. Protect changed and previously failed tests under a unified ceiling. Persist one selection manifest per PR SHA, validate nightly shard exports, and report repeated execution. Keep entry-count scoring experiments and the expanded targeted matrix gated on historical evaluation. Durable CIDB run identity remains dependent on an external schema migration. Related: ClickHouse#117331
RE2 resolves a backslash before any non-alphanumeric character to that character itself, so such an escape is part of a literal.
The analysis only accepted a fixed list of escaped metacharacters, which left
RE2::QuoteMetaoutput on the re2 path, it escapes every non-alphanumeric byte, so a needle containing a space,%or:was not recognized as an anchored literal.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Anchored literal regular expressions whose literal contains an escaped character, such as
^https\://or\%3D$, are now matched by a comparison instead of the regular expression engine. This speeds upmatch,extract,countMatches,regexpPositionandLIKEqueries.Workflow [PR]
Sync PR [sync-upstream/pr/117331]
Version info
26.9.1.581(included in26.9and later)