| 21 | } |
| 22 | |
| 23 | void LazySegmentScanner::applyCommittedUpdates(const UpdateInfo& updateInfo, |
| 24 | const transaction::Transaction* transaction, common::offset_t startRow, |
| 25 | common::offset_t numRows) { |
| 26 | DASSERT(numRows == numValues); |
| 27 | rangeSegments(begin(), numRows, |
| 28 | [&](auto& segment, common::offset_t, common::offset_t lengthInSegment, |
| 29 | common::offset_t offsetInChunk) { |
| 30 | updateInfo.iterateScan(transaction, startRow + offsetInChunk, lengthInSegment, 0, |
| 31 | [&](const VectorUpdateInfo& vecUpdateInfo, uint64_t i, |
| 32 | uint64_t posInOutput) -> void { |
| 33 | scanSegmentIfNeeded(segment); |
| 34 | segment.segmentData->write(vecUpdateInfo.data.get(), i, posInOutput, 1); |
| 35 | }); |
| 36 | }); |
| 37 | } |
| 38 | |
| 39 | void LazySegmentScanner::scanSegmentIfNeeded(LazySegmentData& segment) { |
| 40 | if (segment.segmentData == nullptr) { |
no test coverage detected