Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
acquamarin committed Sep 7, 2023
1 parent f3a6a6e commit df12bfe
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/storage/copier/node_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ uint64_t NodeGroup::append(
auto numValuesToAppendInChunk =
std::min(numValuesToAppend, StorageConstants::NODE_GROUP_SIZE - numNodes);
auto serialSkip = 0u;
auto originalVectorSize = resultSet->getDataChunk(0)->state->selVector->selectedSize;
resultSet->getDataChunk(0)->state->selVector->selectedSize = numValuesToAppendInChunk;
auto originalVectorSize =
resultSet->getDataChunk(dataPoses[0].dataChunkPos)->state->selVector->selectedSize;
resultSet->getDataChunk(dataPoses[0].dataChunkPos)->state->selVector->selectedSize =
numValuesToAppendInChunk;
for (auto i = 0u; i < chunks.size(); i++) {
auto chunk = chunks[i].get();
if (chunk->getDataType().getLogicalTypeID() == common::LogicalTypeID::SERIAL) {
Expand All @@ -51,7 +53,8 @@ uint64_t NodeGroup::append(
auto dataPos = dataPoses[i - serialSkip];
chunk->append(resultSet->getValueVector(dataPos).get(), numNodes, numValuesToAppendInChunk);
}
resultSet->getDataChunk(0)->state->selVector->selectedSize = originalVectorSize;
resultSet->getDataChunk(dataPoses[0].dataChunkPos)->state->selVector->selectedSize =
originalVectorSize;
numNodes += numValuesToAppendInChunk;
return numValuesToAppendInChunk;
}
Expand Down

0 comments on commit df12bfe

Please sign in to comment.