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:
Cai Yudong 2024-04-12 16:29:26 +08:00 committed by GitHub
parent 88c6828d6c
commit 06e0c8baac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}