| 99 | } |
| 100 | |
| 101 | void ListChunkData::append(const ColumnChunkData* other, offset_t startPosInOtherChunk, |
| 102 | uint32_t numValuesToAppend) { |
| 103 | checkOffsetSortedAsc = true; |
| 104 | auto& otherListChunk = other->cast<ListChunkData>(); |
| 105 | nullData->append(other->getNullData(), startPosInOtherChunk, numValuesToAppend); |
| 106 | offset_t offsetInDataChunkToAppend = dataColumnChunk->getNumValues(); |
| 107 | for (auto i = 0u; i < numValuesToAppend; i++) { |
| 108 | auto appendSize = otherListChunk.getListSize(startPosInOtherChunk + i); |
| 109 | sizeColumnChunk->setValue<list_size_t>(appendSize, numValues); |
| 110 | offsetInDataChunkToAppend += appendSize; |
| 111 | setOffsetChunkValue(offsetInDataChunkToAppend, numValues); |
| 112 | } |
| 113 | dataColumnChunk->resize(offsetInDataChunkToAppend); |
| 114 | for (auto i = 0u; i < numValuesToAppend; i++) { |
| 115 | auto startOffset = otherListChunk.getListStartOffset(startPosInOtherChunk + i); |
| 116 | auto appendSize = otherListChunk.getListSize(startPosInOtherChunk + i); |
| 117 | dataColumnChunk->append(otherListChunk.dataColumnChunk.get(), startOffset, appendSize); |
| 118 | } |
| 119 | DASSERT(sanityCheck()); |
| 120 | } |
| 121 | |
| 122 | void ListChunkData::resetToEmpty() { |
| 123 | ColumnChunkData::resetToEmpty(); |
no test coverage detected