Skip to content

refactor: make reranking candidate-read budgets explicit - #2606

Open
erichare wants to merge 5 commits into
hazel/refactor-farrfrom
fix/rerank-candidate-resolution
Open

erichare wants to merge 5 commits into
hazel/refactor-farrfrom
fix/rerank-candidate-resolution

Conversation

@erichare

@erichare erichare commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

Makes each findAndRerank retrieval leg use the limit in its inner find command instead of passing limits through CommandContext. Vector and lexical candidate reads use concrete page sizes, ordinary find behavior is preserved, and malformed internal candidate limits fail as internal state errors.

Depends on #2637. PR #2607 adds pagination to collect the full candidate set.

Which issue(s) this PR fixes:

Refs #2599 (first part).

Verification:

  • ./mvnw -Dtest=FindCommandResolverTest,FindAndRerankOperationBuilderTest,FindAndRerankOperationBuilderBehaviorTest,FindAndRerankPlannerTest test — 191 tests run, 0 failures, 0 errors, 0 skipped; BUILD SUCCESS on Java 21.
  • git diff --check origin/hazel/refactor-farr...HEAD — passed.
  • Integration suites were not run.

Checklist

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

@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.58%
This PR 55.62%
Delta 🟢 +1.04%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 55.62% -0.04% 🍏
Files changed 4.26% ❌

File Coverage
FindAndRerankOperationBuilder.java 93.47% 🍏
CommandContext.java 87.68% 🍏
IntermediateCollectionReadTask.java 57.14% 🍏
FindCommandResolver.java 0% -16.42% ❌

@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.01%
This PR 72.95%
Delta 🟢 +0.94%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 72.95% -0.01% 🍏
Files changed 80.85% 🍏

File Coverage
CommandContext.java 93.56% 🍏
FindCommandResolver.java 92.06% -3.25% 🍏
FindAndRerankOperationBuilder.java 88.4% 🍏
IntermediateCollectionReadTask.java 66.29% 🍏

@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.19%
Delta 🔴 -0.09%
⚠️ 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.19% -0.22% 🍏
Files changed 80.05% 🍏

File Coverage
LegMode.java 100% 🍏
FindAndRerankOperationBuilder.java 100% 🍏
RerankLeg.java 100% 🍏
SortException.java 100% 🍏
FindCommandResolver.java 99.64% -0.36% 🍏
CommandContext.java 93.56% 🍏
FindAndRerankPlanner.java 93.53% -6.47% 🍏
FindAndRerankCommand.java 85.05% 🍏
RerankingQuery.java 78.67% 🍏
DeferredCommandResultAction.java 73.68% 🍏
CommandFeatures.java 71.19% 🍏
LexicalLeg.java 71.05% -28.95% 🍏
VectorizeLeg.java 66.67% -33.33% 🍏
IntermediateCollectionReadTask.java 66.29% 🍏
FindAndRerankSortClauseDeserializer.java 56.99% 🍏
FindAndRerankPlan.java 50.63% -49.37% ❌
FindAndRerankSort.java 36.24% -37.16% ❌
VectorLeg.java 33.33% -66.67% ❌

Base automatically changed from fix/rerank-integration-coverage to main October 7, 2026 01:09
@erichare
erichare force-pushed the fix/rerank-candidate-resolution branch from d4c2b54 to af04e14 Compare October 7, 2026 01:09
@erichare
erichare force-pushed the fix/rerank-candidate-resolution branch from af04e14 to 8df7a12 Compare October 15, 2026 15:02
@erichare
erichare removed this pull request from stack #2608 October 15, 2026 15:04
@erichare
erichare changed the base branch from main to hazel/refactor-farr October 15, 2026 15:04
@erichare
erichare added this pull request to stack #2646 October 15, 2026 15:04
Comment thread src/main/java/io/stargate/sgv2/jsonapi/service/resolver/FindCommandResolver.java Outdated
Comment thread src/main/java/io/stargate/sgv2/jsonapi/service/resolver/FindCommandResolver.java Outdated

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

2 participants