Skip to content

Commit d6fb8f9

Browse files
Fix string pk load reconstruct bug
1 parent 8838210 commit d6fb8f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/db/table_segment_mvp.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ TableSegmentMVP::TableSegmentMVP(meta::TableSchema& table_schema, const std::str
168168
// Read the attribute table
169169
file.read(attribute_table_, record_number_ * primitive_offset_);
170170

171-
// add pk into set
171+
// add int pk into set
172172
if (isIntPK()) {
173173
auto field = table_schema.fields_[*pk_field_idx_];
174174
for (auto rIdx = 0; rIdx < record_number_; rIdx++) {
@@ -222,7 +222,7 @@ TableSegmentMVP::TableSegmentMVP(meta::TableSchema& table_schema, const std::str
222222
case meta::FieldType::STRING: {
223223
std::string str(dataLen, '\0');
224224
file.read(&str[0], dataLen);
225-
var_len_attr_table_[attrIdx][recordIdx] = std::move(str);
225+
var_len_attr_table_[attrIdx][recordIdx] = str;
226226
// add pk into set
227227
if (!deleted_->test(recordIdx) && string_pk_offset_ && *string_pk_offset_ == attrIdx) {
228228
// do not check existance to avoid additional overhead

0 commit comments

Comments
 (0)