Skip to content

feat: add MOL field support in Python SDK#3404

Open
862103595 wants to merge 3 commits intomilvus-io:masterfrom
862103595:feat/mol-python-sdk-pr
Open

feat: add MOL field support in Python SDK#3404
862103595 wants to merge 3 commits intomilvus-io:masterfrom
862103595:feat/mol-python-sdk-pr

Conversation

@862103595
Copy link
Copy Markdown

@862103595 862103595 commented Apr 9, 2026

Summary

  • expose DataType.MOL and FunctionType.MOL_FINGERPRINT in pymilvus
  • support packing MOL scalar values on insert and decoding MOL scalar values from query/search results
  • add focused tests for MOL type exposure, function schema validation, insert-path packing, result decoding, nullable scalar handling, and invalid input boundaries

Dependencies

  • Depends on milvus-io/milvus-proto#554

Test plan

  • PYTHONPATH=. python3 -m pytest --noconftest tests/test_types.py::TestTypes::test_mol_data_type tests/orm/test_schema.py::TestMolFunction tests/test_search_result.py::TestSearchResultExtended::test_mol tests/test_search_result.py::TestSearchResultExtended::test_get_field_data_with_mol tests/test_search_result.py::TestSearchResultExtended::test_extract_struct_field_value_with_mol tests/test_search_result.py::TestSearchResultExtended::test_null_values_all_scalar_types tests/test_client_types.py::TestFunctionType::test_function_type_values[MOL_FINGERPRINT-5] tests/test_client_entity_helper.py::TestEntityHelperExtended::test_pack_field_value_to_field_data_mol tests/test_client_entity_helper.py::TestEntityHelperExtended::test_pack_field_value_to_field_data_mol_invalid_input tests/test_client_entity_helper.py::TestEntityHelperExtended::test_entity_to_field_data_mol tests/test_client_entity_helper.py::TestEntityHelperExtended::test_entity_to_field_data_mol_invalid_input tests/test_client_entity_helper.py::TestEntityHelperExtended::test_extract_row_data_from_fields_data_v2_mol tests/test_client_entity_helper.py::TestEntityHelperExtended::test_extract_row_data_from_fields_data_mol tests/test_client_entity_helper.py::TestEntityHelperExtended::test_entity_to_field_data_nullable_mol tests/test_client_entity_helper.py::TestEntityHelperExtended::test_pack_field_value_nullable_mol_none -q -x

Expose the MOL data type and MOL_FINGERPRINT function in pymilvus, and make query/search result decoding return MOL scalar values from MOL-enabled Milvus servers.

Signed-off-by: xiejh <862103595@qq.com>
@sre-ci-robot sre-ci-robot requested review from longjiquan and tedxu April 9, 2026 03:19
@sre-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 862103595
To complete the pull request process, please assign tedxu after the PR has been reviewed.
You can assign the PR to them by writing /assign @tedxu in a comment when ready.

The full list of commands accepted by this bot can be found 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

@sre-ci-robot
Copy link
Copy Markdown

Welcome @862103595! It looks like this is your first PR to milvus-io/pymilvus 🎉

Add focused MOL coverage for search result decoding, entity helper insert/extract paths, nullable scalar handling, and invalid input boundaries.

Signed-off-by: xiejh <862103595@qq.com>
@862103595 862103595 force-pushed the feat/mol-python-sdk-pr branch from 5ee491f to d9b15a1 Compare April 9, 2026 03:54
@mergify mergify Bot added dco-passed and removed needs-dco labels Apr 9, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 91.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.77%. Comparing base (799a53e) to head (79d9157).

Files with missing lines Patch % Lines
pymilvus/client/search_result.py 66.66% 2 Missing ⚠️
pymilvus/orm/schema.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3404   +/-   ##
=======================================
  Coverage   90.76%   90.77%           
=======================================
  Files          64       64           
  Lines       13887    13923   +36     
=======================================
+ Hits        12605    12639   +34     
- Misses       1282     1284    +2     

☔ View full report in Codecov by Sentry.
📢 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.

Signed-off-by: xiejh <862103595@qq.com>
@mergify mergify Bot added the ci-passed label Apr 9, 2026
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.

2 participants