Skip to content

fix: first row skipped in matchImei IMEI matching#57

Open
sauravbhattacharya001 wants to merge 1 commit intomasterfrom
fix/matchimei-first-row-skipped
Open

fix: first row skipped in matchImei IMEI matching#57
sauravbhattacharya001 wants to merge 1 commit intomasterfrom
fix/matchimei-first-row-skipped

Conversation

@sauravbhattacharya001
Copy link
Owner

Bug

In \matchImei.java, both the sndrnode and srcnode matching loops skip the first result row due to an off-by-one error with JDBC cursor positioning.

Root Cause

\ResultSet.first()\ positions the cursor on row 1. The subsequent \while (rs_event.next())\ immediately advances to row 2, so row 1 is never processed. The same pattern occurs with
s_device.first()\ in the inner loop.

Fix

Replace \ irst()\ with \�eforeFirst(), which positions the cursor before row 1.

After rs_event.first() positions cursor on row 1, the while(rs_event.next())
loop immediately advances to row 2, causing the first matching row to be
silently skipped. Same issue with rs_device.first() inside the inner loop.

Fix: use beforeFirst() which positions cursor before row 1, so next()
correctly processes row 1 first.

This affected both sndrnode and srcnode matching blocks, meaning the first
device match for each query was always missed.
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions bot added data-pipeline Meeting extraction and processing pipeline size/xs labels Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data-pipeline Meeting extraction and processing pipeline size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant