Closed binbinlv closed 5 days ago
related with https://github.com/milvus-io/pymilvus/pull/2275. pr merged, could you please check it? @binbinlv
/assign @binbinlv
Verified and fixed:
pymilvus:2.5.0rc88 milvus: master-20241011-3fe0f829-amd64
results:
>>> dim = 3
>>> schema = CollectionSchema(fields=[
... FieldSchema(name="id", dtype=DataType.INT64, is_primary=True, auto_id=False),
... FieldSchema(name="vector", dtype=DataType.FLOAT_VECTOR, dim=3),
... FieldSchema(name="flat", dtype=DataType.INT64, default_value=999),
... ])
>>>
>>>
>>> collection = Collection("test_binbin_12", schema=schema)
>>> collection.insert(data={"id": 4, "vector": [7,8,9]})
(insert count: 1, delete count: 0, upsert count: 0, timestamp: 453149575917862918, success count: 1, err count: 0
>>>
>>>
>>> index_param = {"index_type": "IVF_FLAT", "metric_type": "L2", "params": {"nlist": 100}}
>>> collection.create_index("vector", index_param, index_name="index_name_1")
Status(code=0, message=)
>>>
>>> collection.load()
>>> collection.query(expr="id>=0", output_fields=["flat", "vector"])
data: ["{'flat': 999, 'vector': [7.0, 8.0, 9.0], 'id': 4}"]
Is there an existing issue for this?
Environment
Current Behavior
Insert rows report error "undefined data type:Int64: invalid parameter" when insert without the default value field
Expected Behavior
Insert rows successfully when insert without the default value field
Steps To Reproduce
Milvus Log
No response
Anything else?
No response