Skip to content

fix: collect complete bounded findAndRerank candidate sets - #2607

Open
erichare wants to merge 4 commits into
fix/rerank-candidate-resolutionfrom
fix/rerank-candidate-pagination
Open

erichare wants to merge 4 commits into
fix/rerank-candidate-resolutionfrom
fix/rerank-candidate-pagination

Conversation

@erichare

@erichare erichare commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

Adds a dedicated candidate-read operation for findAndRerank. It follows continuation pages and shares each leg's limit across its queries.

Reuses query building, document parsing, metrics, and sorting safeguards. Candidate construction supplies explicit page sizes and the full sorted-result budget to the shared resolver. Ordinary find keeps its existing pagination and sorted-result cap.

Depends on #2606, which is stacked on the planner/read-legs refactor in #2637.

Validation: 280 focused parser, planner, builder, resolver, collection-operation, and candidate-pagination tests pass on Java 21. Covers underfilled pages, shared candidate budgets, sorted/unsorted limits, ordinary find pagination, and vector page-size bounds.

Which issue(s) this PR fixes:

Fixes #2599 (completes #2606).

Checklist

  • Changes manually tested
  • Automated Tests added/updated
  • Documentation added/updated
  • CLA Signed: DataStax CLA

@erichare
erichare force-pushed the fix/rerank-candidate-pagination branch from bdb8809 to 6364be7 Compare October 2, 2026 20:21
@erichare
erichare marked this pull request as ready for review October 5, 2026 20:35
@erichare
erichare requested a review from a team as a code owner October 5, 2026 20:35
@erichare
erichare added this pull request to stack #2608 October 5, 2026 20:35
@erichare
erichare force-pushed the fix/rerank-candidate-pagination branch from 35f08a5 to 6144372 Compare October 5, 2026 20:36
@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

📈 Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 54.71%
This PR 56.16%
Delta 🟢 +1.45%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 56.16% -0.04% 🍏
Files changed 91.43% 🍏

File Coverage
CollectionCandidateReadOperation.java 93.33% -6.67% 🍏
FindCollectionOperation.java 90.55% -0.26% 🍏
CollectionReadOperation.java 80.62% -0.75% 🍏
FindCommandResolver.java 0% -7.12% ❌

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

📉 Integration Test Coverage Delta vs Main Branch (dse69-it)

Metric Value
Main Branch 72.95%
This PR 72.91%
Delta 🔴 -0.04%
⚠️ Coverage decreased

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 72.91% -0.06% 🍏
Files changed 87.62% 🍏

File Coverage
FindCommandResolver.java 91.55% -0.7% 🍏
FindCollectionOperation.java 88.89% -0.26% 🍏
CollectionReadOperation.java 87.94% -1.72% 🍏
CollectionCandidateReadOperation.java 81.25% -18.75% 🍏

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

📉 Integration Test Coverage Delta vs Main Branch (hcd-it)

Metric Value
Main Branch 74.27%
This PR 74.23%
Delta 🔴 -0.04%
⚠️ Coverage decreased

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 74.23% -0.05% 🍏
Files changed 89.71% 🍏

File Coverage
FindCommandResolver.java 98.94% -0.7% 🍏
FindCollectionOperation.java 94.51% -0.26% 🍏
CollectionReadOperation.java 87.94% -1.72% 🍏
CollectionCandidateReadOperation.java 85.83% -14.17% 🍏

@erichare
erichare force-pushed the fix/rerank-candidate-pagination branch from 6144372 to bfcd678 Compare October 7, 2026 01:09
@erichare
erichare force-pushed the fix/rerank-candidate-pagination branch from bfcd678 to 1a413a1 Compare October 15, 2026 15:04
@erichare
erichare removed this pull request from stack #2608 October 15, 2026 15:04
@erichare
erichare added this pull request to stack #2646 October 15, 2026 15:04
@erichare
erichare force-pushed the fix/rerank-candidate-pagination branch from 1a413a1 to ec4bda6 Compare October 15, 2026 15:26

This branch has not been deployed

No deployments
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.

Inner reads return at most 50 documents

1 participant