mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 01:58:34 +08:00
fix: wrong format expr for the delete rest api (#30217)
/kind improvement issue: #30092 Signed-off-by: SimFG <bang.fu@zilliz.com>
This commit is contained in:
parent
0907d76253
commit
b62748a1a6
@ -102,7 +102,7 @@ func convertRange(field *schemapb.FieldSchema, result gjson.Result) (string, err
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
dataArray = append(dataArray, value)
|
dataArray = append(dataArray, fmt.Sprintf(`"%s"`, value))
|
||||||
}
|
}
|
||||||
resultStr = joinArray(dataArray)
|
resultStr = joinArray(dataArray)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -340,10 +340,11 @@ func TestPrimaryField(t *testing.T) {
|
|||||||
idStr = gjson.Get(jsonStr, "id")
|
idStr = gjson.Get(jsonStr, "id")
|
||||||
rangeStr, err = convertRange(&primaryField, idStr)
|
rangeStr, err = convertRange(&primaryField, idStr)
|
||||||
assert.Equal(t, nil, err)
|
assert.Equal(t, nil, err)
|
||||||
assert.Equal(t, "1,2,3", rangeStr)
|
assert.Equal(t, `"1","2","3"`, rangeStr)
|
||||||
filter, err = checkGetPrimaryKey(coll, idStr)
|
coll2 := generateCollectionSchema(schemapb.DataType_VarChar, false)
|
||||||
|
filter, err = checkGetPrimaryKey(coll2, idStr)
|
||||||
assert.Equal(t, nil, err)
|
assert.Equal(t, nil, err)
|
||||||
assert.Equal(t, "book_id in [1,2,3]", filter)
|
assert.Equal(t, `book_id in ["1","2","3"]`, filter)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestInsertWithDynamicFields(t *testing.T) {
|
func TestInsertWithDynamicFields(t *testing.T) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user