opensearch-project / opensearch-project/sql-jdbc
[BUG] Driver handles incorrectly empty paging responses
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 28
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
What is the bug?
Driver handles incorrectly empty paging responses
Driver stops paging the cursor if response is empty. Criteria to stop paging is no cursor returned.
How can one reproduce the bug?
Check out and build SQL plugin from branch dev-pagination-v2_revE @ 163093cb76
Run query
select * from <table> limit 5, 5;
with page size (fetch_size) = 2. The tricky part is to have fetch_size less than offset.
Driver returns an empty result set.
What is the expected behavior?
Driver should scroll the cursor until received response has no cursor.
What is your host/environment?
1.2.0.0 from maven
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using the dev-pagination-v2_revE branch at commit 163093cb76, with select * from <table> limit 5, 5; and fetch_size 2. Trace the JDBC driver's paging flow for empty responses and verify that it continues until no cursor is returned, then add or update coverage for this case if the project’s existing tests provide a suitable entry point.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100