VictorMoni opened a new pull request, #69935:
URL: https://github.com/apache/doris/pull/69935
### What problem does this PR solve?
Issue Number: N/A
Related PR: N/A
Problem Summary:
Query Profile text search lowercases the full profile before calculating
match offsets, then uses those offsets to select the original textarea
contents. Unicode lowercase conversion can change string length: searching for
`exectime` in `İ ExecTime İ EXECTIME` returns offsets 3 and 15 instead of 2 and
13. Next/Previous consequently select the wrong characters. Context-sensitive
lowercasing also misses case-insensitive matches such as Greek sigma.
Match an escaped literal against the original text with Unicode
case-insensitive matching. This returns original UTF-16 offsets for the
textarea, preserves non-overlapping matches and trimmed search terms, and keeps
regex metacharacters literal. Matching now uses Unicode simple case folding
rather than locale-dependent lowercasing.
Add unit coverage for expanding lowercase forms, Greek sigma, supplementary
characters, literal regex metacharacters, empty/absent terms, trimming, and
non-overlapping matches. A page test verifies the selected text and
Next/Previous wraparound after an expanding Unicode character in the SQL text.
### Release note
Fix incorrect Query Profile search highlights after Unicode characters and
missed case-insensitive Unicode matches.
### Check List (For Author)
- Test
- [ ] Regression test
- [x] Unit Test: `cd ui && npm test` — 32 files, 139 tests passed.
Focused search/page tests — 29 passed. Before the fix, the original-offset
case, Greek sigma case, and page navigation test failed.
- [x] Manual test: `npm run lint`, `npm run build` (includes TypeScript
checking), and `git diff --check` passed.
- [ ] No need to test or manual test.
No live Doris cluster, FE/BE build, or Playwright end-to-end suite was run.
Vitest emits jsdom getComputedStyle pseudo-element notices; Vite emits its
bundle-size warning.
- Behavior changed:
- [ ] No.
- [x] Yes. Search uses Unicode case-insensitive literal matching and
returns positions in the original profile text.
- Does this need documentation?
- [x] No. No new controls, configuration, or API.
- [ ] Yes.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
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]