Repository navigation
Preserve next-page cursor on scan with post-filter - #324
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
`DataFrame.where()` was constructing a new instance and dropping `offsets` / `hasNext` / `stats`, so any scan invoked with a `filters` (post-filter) argument returned `offset: null` / `hasNext: false`, breaking pagination. `offset` is a property of the underlying paginated scan, not of the filter mode. A post-filter must be transparent to scan metadata: even if every row on a page is rejected by the filter, the cursor must survive as long as the underlying scan has more rows to read. Adds a `scan with offset and filters` regression test in `QueryServiceSpec` that paginates with `limit=2 + filters=permission:eq:me` and verifies that page 1 returns a usable cursor and page 2 yields the remaining matching row. Closes #323 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
em3s
force-pushed
the
feat/issue-323-filter-offset
branch
from
May 13, 2026 14:21
281868f to
bfb402a
Compare
Contributor
Author
|
Optimistic Merging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DataFrame.where()was constructing a new instance and droppingoffsets/hasNext/stats, so any scan invoked with afilters(post-filter) argument returnedoffset: null/hasNext: false, breaking pagination.offsetis a property of the underlying paginated scan, not of the filter mode. A post-filter must be transparent to scan metadata: even if every row on a page is rejected by the filter, the cursor must survive as long as the underlying scan has more rows to read.Closes #323
Changes
DataFrame.where()now returnscopy(rows = filteredRows), preservingoffsets/hasNext/statsinstead of dropping them.scan with offset and filtersregression test inQueryServiceSpec(notIndexFilterSpecas originally written in the issue — that spec only covers therangeschannel viaotherPredicates, not thefilterspost-filter channel).How to Test
The regression test paginates with
limit=2 + filters=permission:eq:meand verifies that page 1 returns a non-null cursor and that page 2, resuming via that cursor, yields the remaining matching row.AI Assistance