mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-06 10:52:56 +08:00
[skip ci]Improve error message in schema (#10353)
Signed-off-by: Xiangyu Wang <xiangyu.wang@zilliz.com>
This commit is contained in:
parent
bbd558f509
commit
c3e8903dc2
@ -97,7 +97,7 @@ func CreateSchemaHelper(schema *schemapb.CollectionSchema) (*SchemaHelper, error
|
||||
// GetPrimaryKeyField returns the schema of the primary key
|
||||
func (helper *SchemaHelper) GetPrimaryKeyField() (*schemapb.FieldSchema, error) {
|
||||
if helper.primaryKeyOffset == -1 {
|
||||
return nil, fmt.Errorf("no primary in schema")
|
||||
return nil, fmt.Errorf("Failed to get primary key field: no primary in schema")
|
||||
}
|
||||
return helper.schema.Fields[helper.primaryKeyOffset], nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user