apache / apache/geaflow

Fix return value incorrect when fromIndex parameter is negative

Open
#87 2 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.