MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / clearToIndex

Method clearToIndex

src/processor/operator/persistent/node_batch_insert.cpp:648–658  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

646}
647
648void 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
660void NodeBatchInsert::writeAndResetNodeGroup(transaction::Transaction* transaction,
661 std::unique_ptr<InMemChunkedNodeGroup>& nodeGroup, std::optional<IndexBuilder>& indexBuilder,

Callers

nothing calls this directly

Calls 2

appendMethod · 0.45
getNumRowsMethod · 0.45

Tested by

no test coverage detected