mirror of https://github.com/milvus-io/milvus.git
[skip ci]Improve error message in schema (#10354)
Signed-off-by: Xiangyu Wang <xiangyu.wang@zilliz.com>pull/10387/head
parent
c3e8903dc2
commit
ff71f53877
|
@ -106,7 +106,7 @@ func (helper *SchemaHelper) GetPrimaryKeyField() (*schemapb.FieldSchema, error)
|
||||||
func (helper *SchemaHelper) GetFieldFromName(fieldName string) (*schemapb.FieldSchema, error) {
|
func (helper *SchemaHelper) GetFieldFromName(fieldName string) (*schemapb.FieldSchema, error) {
|
||||||
offset, ok := helper.nameOffset[fieldName]
|
offset, ok := helper.nameOffset[fieldName]
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("fieldName(%s) not found", fieldName)
|
return nil, fmt.Errorf("Failed to get field schema by name: fieldName(%s) not found", fieldName)
|
||||||
}
|
}
|
||||||
return helper.schema.Fields[offset], nil
|
return helper.schema.Fields[offset], nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue