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

Method addColumn

src/storage/table/chunked_node_group.cpp:400–412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400void ChunkedNodeGroup::addColumn(MemoryManager& mm, const TableAddColumnState& addColumnState,
401 bool enableCompression, PageAllocator* pageAllocator, ColumnStats* newColumnStats) {
402 auto& dataType = addColumnState.propertyDefinition.getType();
403 chunks.push_back(std::make_unique<ColumnChunk>(mm, dataType.copy(), capacity, enableCompression,
404 ResidencyState::IN_MEMORY));
405 auto numExistingRows = getNumRows();
406 chunks.back()->populateWithDefaultVal(addColumnState.defaultEvaluator, numExistingRows,
407 newColumnStats);
408 if (residencyState == ResidencyState::ON_DISK) {
409 DASSERT(pageAllocator);
410 chunks.back()->flush(*pageAllocator);
411 }
412}
413
414bool ChunkedNodeGroup::isDeleted(const Transaction* transaction, row_idx_t rowInChunk) const {
415 if (!versionInfo) {

Callers

nothing calls this directly

Calls 6

getNumRowsFunction · 0.50
getTypeMethod · 0.45
push_backMethod · 0.45
copyMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected