uchenily opened a new pull request, #70709: URL: https://github.com/apache/doris/pull/70709
Constant folding evaluates substring_index for literal arguments in the FE. Issue Number: #68716 Related PR: None PR Type: Bugfix Problem Summary: Negative counts could produce incorrect results for overlapping delimiters and edge cases. The folding implementation now follows non-overlapping delimiter semantics for positive and negative counts. - **Frequency:** Literal substring_index expressions using affected delimiters or counts. - **Root cause:** Negative-count folding relied on split-array indexing and did not correctly handle overlapping delimiters. - **Why existing tests missed it:** Existing coverage did not include overlapping delimiters and the empty-input negative-count case. - **Fix:** Align positive and negative constant folding with substring_index semantics and add FE and regression coverage. - **Other paths and branches:** Non-constant execution paths are unchanged. Not run; verified with git diff --check. The regression test was added to the current branch path under query_p0; the supplied patch referenced a nereids_p0 path that is absent here. Fix incorrect constant-folded substring_index results for overlapping delimiters. - Behavior changed: Yes (see Details) - Does this need documentation: No - Pre-submission status: Partially verified: tests not run - Tool: Codex - Generated: Code, tests and this description. - Human review: Pending. -- 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]
