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

Method getMetadataToFlush

src/storage/table/column_chunk_data.cpp:276–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274}
275
276ColumnChunkMetadata ColumnChunkData::getMetadataToFlush() const {
277 DASSERT(numValues <= capacity);
278 StorageValue minValue = {}, maxValue = {};
279 if (capacity > 0) {
280 std::optional<NullMask> nullMask;
281 if (nullData) {
282 nullMask = nullData->getNullMask();
283 }
284 auto [min, max] =
285 getMinMaxStorageValue(getData(), 0 /*offset*/, numValues, dataType.getPhysicalType(),
286 nullMask.has_value() ? &*nullMask : nullptr, true /*valueRequiredIfUnsupported*/);
287 minValue = min.value_or(StorageValue());
288 maxValue = max.value_or(StorageValue());
289 }
290 DASSERT(getBufferSize() == getBufferSize(capacity));
291 return getMetadataFunction(buffer->getBuffer(), numValues, minValue, maxValue);
292}
293
294void ColumnChunkData::append(ValueVector* vector, const SelectionView& selView) {
295 DASSERT(vector->dataType.getPhysicalType() == dataType.getPhysicalType());

Callers 3

countChunkDataPagesFunction · 0.80
flushDataMethod · 0.80

Calls 6

getMinMaxStorageValueFunction · 0.85
StorageValueFunction · 0.85
getNullMaskMethod · 0.80
getBufferMethod · 0.80
getDataFunction · 0.50
getPhysicalTypeMethod · 0.45

Tested by

no test coverage detected