Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrefetchingResultSetIterator: fix bug w/r/t intermediate zero-row pages #1375

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eappere
Copy link

@eappere eappere commented Feb 3, 2025

Description

How did the Spark Cassandra Connector Work or Not Work Before this Patch

Zero row pages (that aren't the last) can sometimes happen, for example when using "filtering".

The iterator has a logic bug which makes it throw an exception when encountering this.

Fix this issue with minimal code changes and add associated unit test.

General Design of the patch

The fix is rather simple: skip such pages in maybePrefetch (if -> while), and call maybePrefetch in constructor in the event the first page(s) being affected.

Fixes: SPARKC-717

How Has This Been Tested?

Unit test has been added to validate and check the presence of the fix.

Checklist:

  • I have a ticket in the OSS JIRA
  • I have performed a self-review of my own code
  • Locally all tests pass (make sure tests fail without your patch)

Zero row pages (that aren't the last) can sometimes happen, for example when
using "filtering".

The iterator has a logic bug which makes it throw an exception when encountering
this.

Fix this issue with minimal code changes and add associated unit test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant