Fix lazy quantifier priority handling in Glushkov regex engine - #23381
Merged
rapids-bot[bot] merged 2 commits intoJul 21, 2026
Conversation
3 tasks
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe Glushkov frontier eligibility check now rejects ACCEPT entries followed by later character positions. Its failure condition is documented, and split-record regex tests cover differing lazy and greedy quantifier results. ChangesGlushkov lazy quantifier handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
mhaseeb123
approved these changes
Jul 21, 2026
PointKernel
approved these changes
Jul 21, 2026
vyasr
approved these changes
Jul 21, 2026
Contributor
Author
|
/merge |
rapids-bot
Bot
merged commit Jul 21, 2026
9a6de59
into
rapidsai:release/26.08
256 of 261 checks passed
3 tasks
This was referenced Jul 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #23287.
The Glushkov eligibility checker previously rejected an
ACCEPTitem only when it appeared before the first character-consuming frontier item. This missed Thompson-priority frontiers such as[LF, ACCEPT, CR-repeat], where a successful accept has higher priority than a later continuation. Flattening that ordering into Glushkov bit positions caused a reluctant\r+?delimiter to consume a second\r, producing greedy behavior insplit_record_re.This PR:
ACCEPTitem is followed by a laterCHAR_POS, conservatively falling back to the Thompson engine;ACCEPT;StringsSplitTest.SplitRecordRegexLazyQuantifierto verify the delimiter length and resulting split records.The change affects only patterns whose Thompson-priority ordering cannot be represented faithfully by the Glushkov fast path. Supported patterns continue to use Glushkov.
Validation
StringsSplitTest.SplitRecordRegexLazyQuantifier: 1/1 passed.LIBCUDF_DISABLE_GLUSHKOV=1: 1/1 passed.STRINGS_TEST: 540/540 passed.spark-rapids-jnipackage using this cuDF checkout:BUILD SUCCESS; a second same-toolchain rebuild also completed successfully.RegularExpressionTranspilerSuite: 97 succeeded, 0 failed, 6 pre-existing canceled tests; MavenBUILD SUCCESS. The originalstring split fuzz - anchor focusedfailure passed.Checklist