Support AddCollectionStructField interface#1883
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.
Pull request overview
Adds client + request support for Milvus “AddCollectionStructField” (adding a struct/struct-array field to an existing collection), including schema (de)serialization updates and unit tests to validate the produced gRPC request.
Changes:
- Introduces
AddCollectionStructFieldReqrequest model and exposesMilvusClientV2#addCollectionStructField(...). - Implements
CollectionService#addCollectionStructField(...)and extendsSchemaUtilsstruct-field conversions to includenullableandtypeParams. - Adds/updates tests to verify request building and builder-class verification.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk-core/src/test/java/io/milvus/v2/service/collection/CollectionTest.java | Adds unit tests validating the gRPC request for adding a struct field and parameter validation behavior. |
| sdk-core/src/test/java/io/milvus/v2/client/MilvusClientV2Test.java | Extends builder/getter-setter verification to include the new request class. |
| sdk-core/src/test/java/io/milvus/v2/BaseTest.java | Mocks the new gRPC stub method for tests. |
| sdk-core/src/main/java/io/milvus/v2/utils/SchemaUtils.java | Adds nullable + typeParams support for struct field schema conversion to/from gRPC. |
| sdk-core/src/main/java/io/milvus/v2/service/collection/request/CreateCollectionReq.java | Extends struct field schema model with nullable + typeParams. |
| sdk-core/src/main/java/io/milvus/v2/service/collection/request/AddCollectionStructFieldReq.java | New request type for adding a struct field to an existing collection. |
| sdk-core/src/main/java/io/milvus/v2/service/collection/CollectionService.java | Implements the RPC call for addCollectionStructField. |
| sdk-core/src/main/java/io/milvus/v2/client/MilvusClientV2.java | Exposes the new public client method. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: yhmo <yihua.mo@zilliz.com>
No description provided.