-
Notifications
You must be signed in to change notification settings - Fork 5
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
Move to keyset pagination #220
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat solution to the problem you were facing; I agree that it's less brittle than using LIMIT
and OFFSET
since you're now relying on the data rather than implementation-specific definitions of LIMIT
and OFFSET
.
I think you could add a bit more description of what columns are good candidates for keys; from my reading of your code I assume they'd be unique integers.
Anyway, nice work, and glad to see this issue put to rest!
Co-Authored-By: Faisal Alquaddoomi <[email protected]>
Thanks @falquaddoomi for the review and comments! I made some adjustments based on what you mentioned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments, mainly clarification about the fix. Nice job! 🎉
Co-Authored-By: Jenna Tomkinson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exciting to see this enhancement! I made several comments, mostly aimed at improving clarity in comments and variable names. After addressing, feel free to merge 👍
Co-Authored-By: Gregory Way <[email protected]>
Co-Authored-By: Gregory Way <[email protected]>
Co-Authored-By: Gregory Way <[email protected]>
Thank you @gwaybio, @jenna-tomkinson and @falquaddoomi for your reviews! After making adjustments for all comments I believe this is now ready and I'll merge this in. |
Description
This PR modifies "chunk" behavior to follow keyset pagination patterns. We gather sets of pages as
pagesets
which are based on a key per table which is used to help create pages of rows from tables.pagesets
are gathered ahead of time to retain the ability to parallelize where appropriate. This change required a new configuration parameter to be specified per table and the overall join.Operationally this reduces the amount of data stored in tables throughout, reduces the complexity of the sorting performed, and avoids unnecessary data loading which occurs during the use of
OFFSET
.Changes here made it unnecessary to create metadata columns and as a result I've removed those from all spots I could find.
Changes here are intended to address #214 , which turned out to be more related to data size than the sorting implementation. This is confirmed by a now passing
large_data_tests
test of JUMP data using the full dataset (instead of a truncated version).Closes #214
What is the nature of your change?
Checklist
Please ensure that all boxes are checked before indicating that a pull request is ready for review.