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