| 646 | } |
| 647 | |
| 648 | void NodeBatchInsert::clearToIndex(MemoryManager* mm, |
| 649 | std::unique_ptr<InMemChunkedNodeGroup>& nodeGroup, offset_t startIndexInGroup) const { |
| 650 | // Create a new chunked node group and move the unwritten values to it |
| 651 | // TODO(bmwinger): Can probably re-use the chunk and shift the values |
| 652 | const auto oldNodeGroup = std::move(nodeGroup); |
| 653 | const auto nodeInfo = info->ptrCast<NodeBatchInsertInfo>(); |
| 654 | nodeGroup = std::make_unique<InMemChunkedNodeGroup>(*mm, nodeInfo->columnTypes, |
| 655 | nodeInfo->compressionEnabled, StorageConfig::NODE_GROUP_SIZE, 0); |
| 656 | nodeGroup->append(*oldNodeGroup, startIndexInGroup, |
| 657 | oldNodeGroup->getNumRows() - startIndexInGroup); |
| 658 | } |
| 659 | |
| 660 | void NodeBatchInsert::writeAndResetNodeGroup(transaction::Transaction* transaction, |
| 661 | std::unique_ptr<InMemChunkedNodeGroup>& nodeGroup, std::optional<IndexBuilder>& indexBuilder, |
nothing calls this directly
no test coverage detected