mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-06 17:18:35 +08:00
test: add struct array testcases (#44940)
/kind improvement Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
parent
a4935d2eaa
commit
2f4b66d9ab
@ -2,7 +2,6 @@ import pytest
|
||||
import numpy
|
||||
|
||||
from base.client_v2_base import TestMilvusClientV2Base
|
||||
from utils.util_log import test_log as log
|
||||
from common import common_func as cf
|
||||
from common import common_type as ct
|
||||
from common.common_type import CaseLabel, CheckTasks
|
||||
@ -4530,6 +4529,15 @@ class TestMilvusClientCollectionMultipleVectorValid(TestMilvusClientV2Base):
|
||||
and v != DataType.INT8_VECTOR and v != DataType.SPARSE_FLOAT_VECTOR):
|
||||
supported_types.append((k.lower(), v))
|
||||
for field_name, data_type in supported_types:
|
||||
if field_name.lower().startswith("_"):
|
||||
# skip private fields
|
||||
continue
|
||||
if data_type == DataType.STRUCT:
|
||||
# add struct field
|
||||
struct_schema = client.create_struct_field_schema()
|
||||
struct_schema.add_field("struct_scalar_field", DataType.INT64)
|
||||
schema.add_field(field_name, DataType.ARRAY, element_type=DataType.STRUCT, struct_schema=struct_schema, max_capacity=10)
|
||||
continue
|
||||
# Skip INT64 and VARCHAR as they're already added as primary key
|
||||
if data_type != DataType.INT64 and data_type != DataType.VARCHAR:
|
||||
schema.add_field(field_name, data_type)
|
||||
|
||||
3288
tests/python_client/milvus_client/test_milvus_client_struct_array.py
Normal file
3288
tests/python_client/milvus_client/test_milvus_client_struct_array.py
Normal file
File diff suppressed because it is too large
Load Diff
@ -28,9 +28,8 @@ pytest-parallel
|
||||
pytest-random-order
|
||||
|
||||
# pymilvus
|
||||
pymilvus==2.7.0rc44
|
||||
pymilvus[bulk_writer]==2.7.0rc44
|
||||
|
||||
pymilvus==2.7.0rc46
|
||||
pymilvus[bulk_writer]==2.7.0rc46
|
||||
# for protobuf
|
||||
protobuf>=5.29.5
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user