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

Method writeSegment

src/storage/table/column.cpp:356–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354}
355
356void Column::writeSegment(ColumnChunkData& persistentChunk, SegmentState& state,
357 offset_t dstOffsetInSegment, const ColumnChunkData& data, offset_t srcOffset,
358 offset_t numValues) const {
359 auto nullMask = data.getNullMask();
360 columnReadWriter->writeValuesToPageFromBuffer(state, dstOffsetInSegment, data.getData(),
361 nullMask ? &*nullMask : nullptr, srcOffset, numValues, writeFunc);
362
363 if (dataType.getPhysicalType() != common::PhysicalTypeID::ALP_EXCEPTION_DOUBLE &&
364 dataType.getPhysicalType() != common::PhysicalTypeID::ALP_EXCEPTION_FLOAT) {
365 auto [minWritten, maxWritten] =
366 getMinMaxStorageValue(data, srcOffset, numValues, dataType.getPhysicalType());
367 updateStatistics(persistentChunk.getMetadata(), dstOffsetInSegment + numValues - 1,
368 minWritten, maxWritten);
369 }
370}
371
372// TODO: Do we need to adapt the offsets to this current node group?
373void Column::writeValues(ChunkState& state, offset_t initialDstOffset, const uint8_t* data,

Callers 2

Calls 6

getMinMaxStorageValueFunction · 0.85
getNullMaskMethod · 0.80
getMetadataMethod · 0.80
getDataMethod · 0.45
getPhysicalTypeMethod · 0.45

Tested by

no test coverage detected