mirror of https://github.com/milvus-io/milvus.git
Fix nil stats from DeserializeStats (#10255)
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/10279/head
parent
97baf694b9
commit
c3518b8c81
|
@ -88,8 +88,8 @@ func (sr *StatsReader) GetInt64Stats() (*Int64Stats, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeserializeStats(blobs []*Blob) ([]*Int64Stats, error) {
|
func DeserializeStats(blobs []*Blob) ([]*Int64Stats, error) {
|
||||||
results := make([]*Int64Stats, len(blobs))
|
results := make([]*Int64Stats, 0, len(blobs))
|
||||||
for i, blob := range blobs {
|
for _, blob := range blobs {
|
||||||
if blob.Value == nil {
|
if blob.Value == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -99,8 +99,7 @@ func DeserializeStats(blobs []*Blob) ([]*Int64Stats, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
results[i] = stats
|
results = append(results, stats)
|
||||||
}
|
}
|
||||||
return results, nil
|
return results, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue