From f5856812a281ae3e55f10cb880543829a0a250b8 Mon Sep 17 00:00:00 2001 From: "yihao.dai" Date: Fri, 1 Dec 2023 14:40:32 +0800 Subject: [PATCH] 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 --- internal/core/src/segcore/SegmentSealedImpl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/internal/core/src/segcore/SegmentSealedImpl.cpp b/internal/core/src/segcore/SegmentSealedImpl.cpp index 3dd713e6fa..380042c67e 100644 --- a/internal/core/src/segcore/SegmentSealedImpl.cpp +++ b/internal/core/src/segcore/SegmentSealedImpl.cpp @@ -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(count * row_bytes); for (auto i = 0; i < count; i++) { AssertInfo(id_to_data_path.count(ids[i]) != 0, "id not found");