[错误]: REST API 为动态字段中的大整数 (大于 2^53) 返回错误的值
Create collection with dynamic schema
curl -s -X POST http://localhost:19530/v2/vectordb/collections/create
-H "Content-Type: application/json"
-d '{"collectionName": "repro_h12", "dimension": 4}'
sleep 1
Insert integer > 2^53
curl -s -X POST http://localhost:19530/v2/vectordb/entities/insert
-H "Content-Type: application/json"
-d '{
"collectionName": "repro_h12",
"data": [
{"id": 1, "vector": [0.1,0.2,0.3,0.4], "big_val": 9007199254740993},
{"id": 2, "vector": [0.2,0.3,0.4,0.5], "big_val": 9223372036854775807},
{"id": 3, "vector": [0.3,0.4,0.5,0.6], "big_val": 1234567890123456789}
]
}'
sleep 2
Query — response shows WRONG values
curl -s -X POST http://localhost:19530/v2/vectordb/entities/query
-H "Content-Type: application/json"
-d '{"collectionName": "repro_h12", "filter": "id > 0", "outputFields": ["id","big_val"], "limit": 10}'
Proof storage is correct: exact-match filters still return the right rows
curl -s -X POST http://localhost:19530/v2/vectordb/entities/query
-H "Content-Type: application/json"
-d '{"collectionName": "repro_h12", "filter": "id == 1", "outputFields": ["id","big_val"], "limit": 10}'
Proof storage is correct: exact-match filters still return the right rows
curl -s -X POST http://localhost:19530/v2/vectordb/entities/query
-H "Content-Type: application/json"
-d '{"collectionName": "repro_h12", "filter": "id == 2", "outputFields": ["id","big_val"], "limit": 10}'
Proof storage is correct: exact-match filters still return the right rows
curl -s -X POST http://localhost:19530/v2/vectordb/entities/query
-H "Content-Type: application/json"
-d '{"collectionName": "repro_h12", "filter": "id == 3", "outputFields": ["id","big_val"], "limit": 10}'
内容来源: milvus-io/milvus