Skip to content

fix: reject conflicting findAndRerank vector sort keys - #2618

Open
erichare wants to merge 4 commits into
mainfrom
fix/rerank-vector-sort-conflict
Open

erichare wants to merge 4 commits into
mainfrom
fix/rerank-vector-sort-conflict

Conversation

@erichare

@erichare erichare commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What this PR does:

Rejects $hybrid sorts that contain both $vector and $vectorize, using key presence before either value is interpreted. Adds coverage for valid, null, empty, and whitespace values.

Which issue(s) this PR fixes:
Fixes #2616

Verification:

./mvnw -Dtest=FindAndRerankSortClauseDeserializerTest test — 41 tests passed, 0 failures, 0 errors, 0 skipped. Full unit and integration suites were not run.

Checklist

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

RED: all 16 key-presence combinations fail to throw JsonMappingException in FindAndRerankSortClauseDeserializerTest on Java 21.
GREEN: 96 parser, reranking builder, and ObjectMapper tests pass on Java 21, including all 16 conflicting-key cases.
@erichare
erichare requested a review from a team as a code owner October 6, 2026 21:59
@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

📈 Unit Test Coverage Delta vs Main Branch

Metric Value
Main Branch 55.07%
This PR 55.08%
Delta 🟢 +0.01%
✅ Coverage improved!

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Unit Test Coverage Report

Overall Project 55.08% 🍏
Files changed 100% 🍏

File Coverage
FindAndRerankSortClauseDeserializer.java 99.49% 🍏

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

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

Metric Value
Main Branch 73.04%
This PR 73.03%
Delta 🔴 -0.00%
⚠️ Coverage decreased

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (dse69-it)

Overall Project 73.03% -0.01% 🍏
Files changed 50% ❌

File Coverage
FindAndRerankSortClauseDeserializer.java 57.58% -2.06% ❌

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

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

Metric Value
Main Branch 74.35%
This PR 74.35%
Delta 🔴 -0.00%
⚠️ Coverage decreased

@github-actions

github-actions Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Integration Test Coverage Report (hcd-it)

Overall Project 74.35% -0.01% 🍏
Files changed 50% ❌

File Coverage
FindAndRerankSortClauseDeserializer.java 57.58% -2.06% ❌

@erichare

Copy link
Copy Markdown
Contributor Author

@Hazel-Datastax @amorton when you get a chance do you mind taking a look at this

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.

findAndRerank: reject a sort that contains both $vector and $vectorize

1 participant