Skip to content

Commit

Permalink
Merge pull request #2161 from kuzudb/fix-copy-num
Browse files Browse the repository at this point in the history
Fix numNodes in CopyNode
  • Loading branch information
ray6080 committed Oct 9, 2023
2 parents 6722723 + c6116f1 commit 5c89dc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/processor/operator/persistent/copy_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,9 @@ void CopyNode::checkNonNullConstraint(NullColumnChunk* nullChunk, offset_t numNo
}

void CopyNode::finalize(ExecutionContext* context) {
uint64_t numNodes = 0;
uint64_t numNodes = StorageUtils::getStartOffsetOfNodeGroup(sharedState->getCurNodeGroupIdx());
if (sharedState->sharedNodeGroup) {
numNodes = StorageUtils::getStartOffsetOfNodeGroup(sharedState->getCurNodeGroupIdx()) +
sharedState->sharedNodeGroup->getNumNodes();
numNodes += sharedState->sharedNodeGroup->getNumNodes();
auto nodeGroupIdx = sharedState->getNextNodeGroupIdx();
writeAndResetNodeGroup(nodeGroupIdx, sharedState->pkIndex.get(), sharedState->pkColumnID,
sharedState->table, sharedState->sharedNodeGroup.get(), sharedState->isCopyRdf);
Expand Down

0 comments on commit 5c89dc5

Please sign in to comment.