| 478 | } |
| 479 | |
| 480 | bool 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 | |
| 503 | std::vector<std::unique_ptr<ColumnChunkData>> Column::checkpointSegment( |
| 504 | ColumnCheckpointState&& checkpointState, PageAllocator& pageAllocator, |
no test coverage detected