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

Method write

src/storage/table/string_chunk_data.cpp:151–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149}
150
151void StringChunkData::write(const ValueVector* vector, offset_t offsetInVector,
152 offset_t offsetInChunk) {
153 DASSERT(vector->dataType.getPhysicalType() == PhysicalTypeID::STRING ||
154 vector->dataType.getPhysicalType() == PhysicalTypeID::JSON);
155 if (!needFinalize && offsetInChunk < numValues) [[unlikely]] {
156 needFinalize = true;
157 }
158 nullData->setNull(offsetInChunk, vector->isNull(offsetInVector));
159 if (offsetInChunk >= numValues) {
160 updateNumValues(offsetInChunk + 1);
161 }
162 if (!vector->isNull(offsetInVector)) {
163 auto str = vector->getValue<string_t>(offsetInVector);
164 setValueFromString(str.getAsStringView(), offsetInChunk);
165 }
166}
167
168void StringChunkData::write(ColumnChunkData* chunk, ColumnChunkData* dstOffsets, RelMultiplicity) {
169 DASSERT((chunk->getDataType().getPhysicalType() == PhysicalTypeID::STRING ||

Callers

nothing calls this directly

Calls 7

getValue<string_t>Method · 0.80
getAsStringViewMethod · 0.80
getDataTypeMethod · 0.80
getPhysicalTypeMethod · 0.45
setNullMethod · 0.45
isNullMethod · 0.45
getNumValuesMethod · 0.45

Tested by

no test coverage detected