Fix return value incorrect when fromIndex parameter is negative
Open
- Dominant language
- Java
- Stars
- 808
- Forks
- 188
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 2
Description
For udf `Instr` when the `fromIndex < 0`, current return value is incorrect. It should searches backward from the resulting position.
Contributor guide
Research direction
Start at the UDF `Instr` implementation and locate its existing handling of `fromIndex`; reproduce the incorrect result when the parameter is negative. Check for related tests, then add a regression case that verifies searching backward from the resulting position and confirm the corrected return value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100