mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-07 19:31:51 +08:00
fix: optimize invalid datatype error msg (#37376)
issue: #37151 Signed-off-by: xianliang.li <xianliang.li@zilliz.com>
This commit is contained in:
parent
f54cf41830
commit
eaf86f7649
@ -473,7 +473,7 @@ func checkTrain(field *schemapb.FieldSchema, indexParams map[string]string) erro
|
||||
if typeutil.IsVectorType(field.DataType) && indexType != indexparamcheck.AutoIndex {
|
||||
exist := CheckVecIndexWithDataTypeExist(indexType, field.DataType)
|
||||
if !exist {
|
||||
return fmt.Errorf("data type %d can't build with this index %s", field.DataType, indexType)
|
||||
return fmt.Errorf("data type %s can't build with this index %s", schemapb.DataType_name[int32(field.GetDataType())], indexType)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -864,7 +864,7 @@ func TestCreateSparseUnsupportedIndex(t *testing.T) {
|
||||
// create unsupported vector index on sparse field
|
||||
for _, idx := range hp.GenAllFloatIndex(entity.IP) {
|
||||
_, err := mc.CreateIndex(ctx, client.NewCreateIndexOption(schema.CollectionName, common.DefaultSparseVecFieldName, idx))
|
||||
common.CheckErr(t, err, false, fmt.Sprintf("data type 104 can't build with this index %v", idx.IndexType()))
|
||||
common.CheckErr(t, err, false, fmt.Sprintf("data type SparseFloatVector can't build with this index %v", idx.IndexType()))
|
||||
}
|
||||
|
||||
// create scalar index on sparse vector
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user