mirror of https://github.com/milvus-io/milvus.git
Remove invalid offset check while filling data (#26666)
Signed-off-by: yah01 <yah2er0ne@outlook.com>pull/26656/head
parent
cd7f811d40
commit
b475f25042
|
@ -469,9 +469,7 @@ SegmentGrowingImpl::bulk_subscript_impl(const VectorBase* vec_raw,
|
|||
auto output = reinterpret_cast<T*>(output_raw);
|
||||
for (int64_t i = 0; i < count; ++i) {
|
||||
auto offset = seg_offsets[i];
|
||||
if (offset != INVALID_SEG_OFFSET) {
|
||||
output[i] = vec[offset];
|
||||
}
|
||||
output[i] = vec[offset];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -739,9 +739,7 @@ SegmentSealedImpl::bulk_subscript_impl(const void* src_raw,
|
|||
|
||||
for (int64_t i = 0; i < count; ++i) {
|
||||
auto offset = seg_offsets[i];
|
||||
if (offset != INVALID_SEG_OFFSET) {
|
||||
dst[i] = src[offset];
|
||||
}
|
||||
dst[i] = src[offset];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -755,9 +753,7 @@ SegmentSealedImpl::bulk_subscript_impl(const ColumnBase* column,
|
|||
auto dst = reinterpret_cast<T*>(dst_raw);
|
||||
for (int64_t i = 0; i < count; ++i) {
|
||||
auto offset = seg_offsets[i];
|
||||
if (offset != INVALID_SEG_OFFSET) {
|
||||
dst[i] = std::move(T(field->RawAt(offset)));
|
||||
}
|
||||
dst[i] = std::move(T(field->RawAt(offset)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -772,13 +768,8 @@ SegmentSealedImpl::bulk_subscript_impl(int64_t element_sizeof,
|
|||
auto dst_vec = reinterpret_cast<char*>(dst_raw);
|
||||
for (int64_t i = 0; i < count; ++i) {
|
||||
auto offset = seg_offsets[i];
|
||||
auto src = src_vec + element_sizeof * offset;
|
||||
auto dst = dst_vec + i * element_sizeof;
|
||||
const char* src = (offset == INVALID_SEG_OFFSET
|
||||
? nullptr
|
||||
: (src_vec + element_sizeof * offset));
|
||||
if (!src) {
|
||||
continue;
|
||||
}
|
||||
memcpy(dst, src, element_sizeof);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue