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

Method appendEmptyTuple

src/processor/result/factorized_table.cpp:163–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161 this->numTuples = numTuples;
162}
163uint8_t* FactorizedTable::appendEmptyTuple() {
164 auto numBytesPerTuple = tableSchema.getNumBytesPerTuple();
165 if (flatTupleBlockCollection->needAllocation(numBytesPerTuple)) {
166 auto newBlock = std::make_unique<DataBlock>(memoryManager, flatTupleBlockSize);
167 flatTupleBlockCollection->append(std::move(newBlock));
168 }
169 auto block = flatTupleBlockCollection->getLastBlock();
170 uint8_t* tuplePtr = block->getWritableData();
171 block->freeSize -= numBytesPerTuple;
172 block->numTuples++;
173 numTuples++;
174 return tuplePtr;
175}
176
177void FactorizedTable::scan(std::span<ValueVector*> vectors, ft_tuple_idx_t tupleIdx,
178 uint64_t numTuplesToScan, std::span<ft_col_idx_t> colIdxesToScan) const {

Callers 3

findHashSlotsMethod · 0.80

Calls 5

needAllocationMethod · 0.80
getLastBlockMethod · 0.80
getWritableDataMethod · 0.80
getNumBytesPerTupleMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected