Skip to content

fix: preserve Jaccard identity for empty binary vectors - #1809

Merged
sre-ci-robot merged 1 commit into
zilliztech:mainfrom
foxspy:fix-jaccard-empty-vector-distance
Sep 8, 2026
Merged

fix: preserve Jaccard identity for empty binary vectors#1809
sre-ci-robot merged 1 commit into
zilliztech:mainfrom
foxspy:fix-jaccard-empty-vector-distance

Conversation

@foxspy

@foxspy foxspy commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

issue: #1808

Summary

  • Return zero Jaccard distance when both binary vectors have an empty union.
  • Cover the generic and fixed-size Jaccard distance implementations with a regression test.

Verification

  • pre-commit run --files tests/ut/test_bruteforce.cc thirdparty/faiss/faiss/cppcontrib/knowhere/utils/binary_distances.cpp thirdparty/faiss/faiss/cppcontrib/knowhere/utils/jaccard-inl.h
  • ./build/Release/tests/ut/knowhere_tests "Binary Jaccard preserves empty-vector identity"
  • ./build/Release/tests/ut/knowhere_tests "[binary vector]"

Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
@sre-ci-robot
sre-ci-robot requested a review from liliu-z September 8, 2026 11:12
@sre-ci-robot

Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: foxspy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@foxspy foxspy added the kind/bug This PR is a bug fix label Sep 8, 2026
@mergify mergify Bot added the dco-passed label Sep 8, 2026
@alexanderguzhva

Copy link
Copy Markdown
Collaborator

/lgtm

@mergify mergify Bot added the ci-passed label Sep 8, 2026
@sre-ci-robot
sre-ci-robot merged commit 6a825ff into zilliztech:main Sep 8, 2026
15 of 16 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.

3 participants