Repository navigation
Commit 4e3b967
authored
[improvement](constant folding) Reuse parsed URL query bounds (#68177)
Related PR: #68011
Problem Summary: The FE constant-folding implementation of
`parse_url(..., 'QUERY')` already locates the first `#` in the URL, but
then creates a suffix string and scans that suffix for `#` again. This
repeats work and, when a fragment exists, temporarily copies the
fragment even though its end position is already known. Reuse the
existing query and fragment boundaries to extract the result directly.
The returned values and NULL/empty-string behavior are unchanged.
### Release note
None
### Check List (For Author)
- Test: No need to test (small allocation and scan reduction; no
behavior change)
- Behavior changed: No
- Does this need documentation: No1 parent 1f41d42 commit 4e3b967
1 file changed
Lines changed: 2 additions & 2 deletions
File tree
- fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
1047 | | - | |
1048 | | - | |
| 1047 | + | |
| 1048 | + | |
1049 | 1049 | | |
1050 | 1050 | | |
1051 | 1051 | | |
| |||
0 commit comments