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

WIP: Use fetchSize, return next page instead of the current one #2592

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ntaouros
Copy link

@ntaouros ntaouros commented Sep 6, 2022

Fixes #2591

Problem

val queryToRun = quote {
      query[MY_TABLE]
    }

    val observable = ctx.stream(queryToRun, 10000) 

The above query would only fetch 5000 pages regardless of value of fetchSize provided.

That's because of 2 reasons:

  • the fetchSize gets disregarded and the page size defaults to 5000
  • when streaming the data the paging algorithm never returns the next page. It keeps returning the same page

Solution

  • Take the fetchSize into account

  • Return the next page instead of the current one

  • Unit test all changes

  • Update README.md if applicable

  • Add [WIP] to the pull request title if it's work in progress

  • Squash commits that aren't meaningful changes

  • Run sbt scalariformFormat test:scalariformFormat to make sure that the source files are formatted

@getquill/maintainers

@CLAassistant
Copy link

CLAassistant commented Sep 6, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ ntaouros
❌ Dionysios Ntaouros


Dionysios Ntaouros seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ntaouros ntaouros changed the title Use fetchSize, return next page instead of the current one WIP: Use fetchSize, return next page instead of the current one Sep 14, 2022
@guizmaii
Copy link
Member

guizmaii commented Sep 29, 2023

@ntaouros Can you rebase your PR, please?

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.

Quill cassandra monix: fetchSize parameter gets ignored
3 participants