Skip to content

[Python] Fix __int__ typo and join_fn type hints in Milvus search handler - #40475

Merged
Abacn merged 1 commit into
apache:masterfrom
pangwangshu:fix-milvus-ranker-init-and-join-fn-hint
Oct 9, 2026
Merged

Abacn merged 1 commit into
apache:masterfrom
pangwangshu:fix-milvus-ranker-init-and-join-fn-hint

Conversation

@pangwangshu

Copy link
Copy Markdown
Contributor

Removes the stray MilvusBaseRanker.__int__, a typo for __init__ that made int(ranker) raise TypeError; the base class has no state to initialize, so it is removed rather than renamed. Also annotates join_fn with EmbeddableItem, which the handler actually passes in, instead of Embedding, and drops the now-unused Embedding import.

No behavior change for existing users. Existing unit tests pass.

Fixes #40474

…dler

Remove the stray MilvusBaseRanker.__int__ (a typo for __init__ that made
int(ranker) raise TypeError, and the base class has no state to
initialize), and annotate join_fn with EmbeddableItem, which is what the
handler actually passes in, instead of Embedding.

Fixes apache#40474

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @shunping for label python.

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@shunping shunping left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for filing the bug and fix it right away! LGTM and waiting for the tests to finish before merging.

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 56.23%. Comparing base (76f6e6d) to head (cc5ae69).
⚠️ Report is 105 commits behind head on master.

Files with missing lines Patch % Lines
...hon/apache_beam/ml/rag/enrichment/milvus_search.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #40475      +/-   ##
============================================
+ Coverage     56.16%   56.23%   +0.06%     
  Complexity     2288     2288              
============================================
  Files          1124     1124              
  Lines        178336   178359      +23     
  Branches       1489     1489              
============================================
+ Hits         100170   100303     +133     
+ Misses        75645    75535     -110     
  Partials       2521     2521              
Flag Coverage Δ
python 79.69% <0.00%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Abacn
Abacn merged commit 301ffe9 into apache:master Oct 9, 2026
84 of 85 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Typo __int__ in MilvusBaseRanker and wrong type hint on milvus_search.join_fn

3 participants