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

Method finalizeCSRRegionEndOffsets

src/storage/table/csr_chunked_node_group.cpp:162–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void ChunkedCSRHeader::finalizeCSRRegionEndOffsets(
163 const offset_vec_t& rightCSROffsetOfRegions) const {
164 const auto numNodes = length->getNumValues();
165 const auto numLeafRegions = getNumRegions();
166 DASSERT(numLeafRegions == rightCSROffsetOfRegions.size());
167 for (auto regionIdx = 0u; regionIdx < numLeafRegions; regionIdx++) {
168 CSRRegion region{regionIdx, 0 /* level*/};
169 const auto rightNodeOffset = std::min(region.rightNodeOffset, numNodes - 1);
170 offset->setValue<offset_t>(rightCSROffsetOfRegions[regionIdx], rightNodeOffset);
171 }
172}
173
174idx_t ChunkedCSRHeader::getNumRegions() const {
175 const auto numNodes = length->getNumValues();

Callers 3

populateCSRHeaderMethod · 0.80
checkpointInMemOnlyMethod · 0.80

Calls 2

getNumValuesMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected