Remove temporary variable to prevent memory fragmentation (#17728)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This commit is contained in:
bigsheeper 2022-06-28 16:30:23 +08:00 committed by GitHub
parent 899a9bf86d
commit b657e58370
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,9 +32,7 @@ SegmentInternalInterface::FillPrimaryKeys(const query::Plan* plan, SearchResult&
auto field_data = bulk_subscript(pk_field_id, results.seg_offsets_.data(), size);
results.pk_type_ = DataType(field_data->type());
std::vector<PkType> pks(size);
ParsePksFromFieldData(pks, *field_data.get());
results.primary_keys_ = std::move(pks);
ParsePksFromFieldData(results.primary_keys_, *field_data.get());
}
void