test: add e2e cases for nullable vector backup and restore - #1048
Open
huanghaoyuanhhy wants to merge 1 commit into
Open
test: add e2e cases for nullable vector backup and restore#1048huanghaoyuanhhy wants to merge 1 commit into
huanghaoyuanhhy wants to merge 1 commit into
Conversation
Collaborator
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: huanghaoyuanhhy The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1048 +/- ##
=======================================
Coverage 42.50% 42.50%
=======================================
Files 136 136
Lines 12181 12181
=======================================
Hits 5178 5178
Misses 6624 6624
Partials 379 379 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
huanghaoyuanhhy
force-pushed
the
add-nullable-vector-tests
branch
from
May 20, 2026 09:10
5de8c1b to
22a78ee
Compare
Signed-off-by: huanghaoyuanhhy <haoyuan.huang@zilliz.com>
huanghaoyuanhhy
force-pushed
the
add-nullable-vector-tests
branch
from
August 13, 2026 07:07
22a78ee to
43cfa30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add end-to-end coverage for nullable vector fields (Milvus 2.6.18 / 3.0.0 feature) through the backup/restore round-trip. Existing nullable tests only cover scalar fields (FLOAT, VARCHAR, JSON, ARRAY) — there is no coverage that the
nullable=trueflag and per-row NULL semantics survive backup + restore for vector fields.Changes
tests/testcases/test_restore_nullable_vector.pywith four test cases:test_restore_nullable_vector_round_tripparameterized over the six vector dtypes in scope (FLOAT, FLOAT16, BFLOAT16, INT8, BINARY, SPARSE_FLOAT): asserts the restored field keepsnullable=trueand that NULL / non-NULL rows are preserved per primary key.test_restore_nullable_vector_search_skips_null: builds an index on the restored collection and confirms search hits are at most the non-NULL row count and never land on a NULL row.test_restore_add_nullable_vector_field: exercisesadd_collection_fieldwith a nullable vector field, then checks the field round-trips and pre-add rows come back as NULL.test_restore_nullable_vector_with_skip_create_collection: negative case asserting that restoring NULL vector rows into a pre-created target withnullable=falsefails fast (L2; expected to harden further once the restore path adds a pre-flight nullable schema check).The tests bypass
compare_collectionsand inspect rows directly viaMilvusClient.query, becausecompare_collectionsdoes a strictsrc_res[i] == dist_res[i]which is ambiguous for numpy ndarray vector values and may not handle nullable vectors cleanly./kind improvement