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

Method canCheckpointInPlace

src/storage/table/column.cpp:480–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480bool Column::canCheckpointInPlace(const SegmentState& state,
481 const ColumnCheckpointState& checkpointState) const {
482 if (isEndOffsetOutOfPagesCapacity(checkpointState.persistentData.getMetadata(),
483 checkpointState.endRowIdxToWrite)) {
484 return false;
485 }
486 if (checkpointState.persistentData.getMetadata().compMeta.canAlwaysUpdateInPlace()) {
487 return true;
488 }
489
490 InPlaceUpdateLocalState localUpdateState{};
491 for (auto& segmentCheckpointState : checkpointState.segmentCheckpointStates) {
492 auto& chunkData = segmentCheckpointState.chunkData;
493 if (chunkData.getNumValues() != 0 &&
494 !state.metadata.compMeta.canUpdateInPlace(chunkData.getData(),
495 segmentCheckpointState.startRowInData, segmentCheckpointState.numRows,
496 dataType.getPhysicalType(), localUpdateState, chunkData.getNullMask())) {
497 return false;
498 }
499 }
500 return true;
501}
502
503std::vector<std::unique_ptr<ColumnChunkData>> Column::checkpointSegment(
504 ColumnCheckpointState&& checkpointState, PageAllocator& pageAllocator,

Callers 1

checkpointSegmentMethod · 0.45

Calls 7

getMetadataMethod · 0.80
getNullMaskMethod · 0.80
getNumValuesMethod · 0.45
canUpdateInPlaceMethod · 0.45
getDataMethod · 0.45
getPhysicalTypeMethod · 0.45

Tested by

no test coverage detected