Repository navigation
feat: add type params support to StructFieldSchema - #620
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yhmo 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 |
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
Support struct-level type_params (e.g. mmap.enabled, warmup) on StructFieldSchema, mirroring FieldSchema and matching Java/pymilvus. Type params are written to proto StructArrayFieldSchema.type_params on create/add-field and read back on describe, allowing Milvus 2.6.6+ server to propagate mmap/warmup settings to struct sub-fields. Signed-off-by: yhmo <yihua.mo@zilliz.com>
7bf01c5 to
be3d419
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #620 +/- ##
===========================================
+ Coverage 53.47% 89.81% +36.34%
===========================================
Files 52 436 +384
Lines 4432 17817 +13385
Branches 0 1925 +1925
===========================================
+ Hits 2370 16003 +13633
+ Misses 2062 1811 -251
- Partials 0 3 +3
🚀 New features to boost your workflow:
|
Summary
Add struct-level
type_paramssupport toStructFieldSchema(e.g.mmap.enabled,warmup), matching Java (StructFieldSchema.typeParamson master/3.0) and PyMilvus (wire keymmap.enabledafter pymilvus normalizes themmap_enabledkwarg).Changes
src/include/milvus/types/StructFieldSchema.h/src/impl/types/StructFieldSchema.cpp: addTypeParams(),SetTypeParams(const& / &&), fluentAddTypeParam(), mirroringFieldSchema; header docs note the merge/no-overwrite semantics.src/impl/utils/TypeUtils.cpp: wire struct-level type params in both proto directions — SDK→proto (ConvertStructFieldSchema) writes toStructArrayFieldSchema.type_params; proto→SDK reads them back (so DescribeCollection returns them).TestStructFieldSchema.cppandTestTypeUtils.cppcover the new API and both conversions, using the server-recognizedmmap.enabledwire key.Background
StructArrayFieldSchema.type_paramsexists in milvus-proto since v2.6.6; Milvus server 2.6.6+ propagates struct-levelmmap.enabled/warmupto sub-fields at load time (querycoordapplyCollectionMmapSetting/applyCollectionWarmupSetting). C++ SDK was the only SDK missing this passthrough.