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

Method initializeScanState

src/storage/table/csr_node_group.cpp:61–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void CSRNodeGroup::initializeScanState(const Transaction* transaction,
62 TableScanState& state) const {
63 auto& relScanState = state.cast<RelTableScanState>();
64 DASSERT(relScanState.nodeGroupScanState);
65 auto& nodeGroupScanState = relScanState.nodeGroupScanState->cast<CSRNodeGroupScanState>();
66 if (relScanState.nodeGroupIdx != nodeGroupIdx || relScanState.randomLookup) {
67 relScanState.nodeGroupIdx = nodeGroupIdx;
68 if (persistentChunkGroup) {
69 initScanForCommittedPersistent(transaction, relScanState, nodeGroupScanState);
70 }
71 }
72 // Switch to a new Vector of bound nodes (i.e., new csr lists) in the node group.
73 if (persistentChunkGroup) {
74 nodeGroupScanState.nextRowToScan = 0;
75 nodeGroupScanState.numCachedRows = 0;
76 nodeGroupScanState.nextCachedRowToScan = 0;
77 nodeGroupScanState.source = CSRNodeGroupScanSource::COMMITTED_PERSISTENT;
78 } else if (csrIndex) {
79 initScanForCommittedInMem(relScanState, nodeGroupScanState);
80 } else {
81 nodeGroupScanState.source = CSRNodeGroupScanSource::NONE;
82 nodeGroupScanState.nextRowToScan = 0;
83 }
84}
85
86void CSRNodeGroup::initScanForCommittedPersistent(const Transaction* transaction,
87 RelTableScanState& relScanState, CSRNodeGroupScanState& nodeGroupScanState) const {

Callers 2

scanCommittedUpdatesFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected