fix: Fix get binary vector from chunk cache (#28866)

The way of getting binary vector size is wrong. This PR will fix it.

issue: https://github.com/milvus-io/milvus/issues/28865

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/28896/head
yihao.dai 2023-12-01 14:40:32 +08:00 committed by GitHub
parent 7206795e91
commit f5856812a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -780,8 +780,7 @@ SegmentSealedImpl::get_vector(FieldId field_id,
}
// assign to data array
auto dim = field_meta.get_dim();
auto row_bytes = field_meta.is_vector() ? dim * 4 : dim / 8;
auto row_bytes = field_meta.get_sizeof();
auto buf = std::vector<char>(count * row_bytes);
for (auto i = 0; i < count; i++) {
AssertInfo(id_to_data_path.count(ids[i]) != 0, "id not found");