Skip to content

Commit

Permalink
Fix string pk load reconstruct bug
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-epsilla committed Feb 14, 2024
1 parent 8838210 commit d6fb8f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions engine/db/table_segment_mvp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ TableSegmentMVP::TableSegmentMVP(meta::TableSchema& table_schema, const std::str
// Read the attribute table
file.read(attribute_table_, record_number_ * primitive_offset_);

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

0 comments on commit d6fb8f9

Please sign in to comment.