mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 02:48:45 +08:00
fix: fix estimate float16 field data size wrong (#32193)
Issue: #32192 Signed-off-by: Cai Yudong <yudong.cai@zilliz.com>
This commit is contained in:
parent
88c6828d6c
commit
06e0c8baac
@ -28,13 +28,11 @@ func estimateFieldDataSize(dim int64, numRows int64, dataType schemapb.DataType)
|
||||
return uint64(dim) / 8 * uint64(numRows), nil
|
||||
case schemapb.DataType_FloatVector:
|
||||
return uint64(dim) * uint64(numRows) * 4, nil
|
||||
case schemapb.DataType_Float16Vector:
|
||||
case schemapb.DataType_BFloat16Vector:
|
||||
case schemapb.DataType_Float16Vector, schemapb.DataType_BFloat16Vector:
|
||||
return uint64(dim) * uint64(numRows) * 2, nil
|
||||
case schemapb.DataType_SparseFloatVector:
|
||||
return 0, errors.New("could not estimate field data size of SparseFloatVector")
|
||||
default:
|
||||
return 0, nil
|
||||
}
|
||||
return 0, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user