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

Method append

src/storage/table/list_chunk_data.cpp:101–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void 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
122void ListChunkData::resetToEmpty() {
123 ColumnChunkData::resetToEmpty();

Callers 3

writeMethod · 0.45
copyListValuesMethod · 0.45
finalizeMethod · 0.45

Calls 10

resizeFunction · 0.85
getSelSizeMethod · 0.80
getDataVectorFunction · 0.50
getNumValuesMethod · 0.45
getListSizeMethod · 0.45
resizeMethod · 0.45
getListStartOffsetMethod · 0.45
getMethod · 0.45
isNullMethod · 0.45
setNullMethod · 0.45

Tested by

no test coverage detected