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

Method resizeWithoutPreserve

src/storage/table/column_chunk_data.cpp:504–516  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504void ColumnChunkData::resizeWithoutPreserve(uint64_t newCapacity) {
505 const auto numBytesAfterResize = getBufferSize(newCapacity);
506 if (numBytesAfterResize > getBufferSize()) {
507 auto resizedBuffer = buffer->getMemoryManager()->allocateBuffer(false, numBytesAfterResize);
508 buffer = std::move(resizedBuffer);
509 }
510 if (nullData) {
511 nullData->resize(newCapacity);
512 }
513 if (newCapacity > capacity) {
514 capacity = newCapacity;
515 }
516}
517
518void ColumnChunkData::populateWithDefaultVal(ExpressionEvaluator& defaultEvaluator,
519 uint64_t& numValues_, ColumnStats* newColumnStats) {

Callers

nothing calls this directly

Calls 3

allocateBufferMethod · 0.80
getMemoryManagerMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected