-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
When running retrieve multiple items from an index with the nextunique or prevunique direction, we iterate over items in a while loop.
- Let i be 0.
- While i is less than rangeRecordsLength, then:
- Increase i by 1.
- if record’s size is equal to count, then break.
- If the result of comparing two keys using the keys from |rangeRecords[i]| and |rangeRecords[i-1]| is equal, then continue.
- Else append |rangeRecords[i]| to records.
This means
range_records[0]will never be added torecords.- We always start with
i = 1
- We always start with
- In the last iteration, we will try to access
range_records[length], and that is out of bounds.- We check for
less than, then increment it to be equal
- We check for
Suggested solution:
- Change
While i is less than range records lengthtoWhile i is less than range records length - 1 - Add new step between current 3 and 4:
Append |range records[0]| to records.
Metadata
Metadata
Assignees
Labels
No labels