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

Method populateWithDefaultVal

src/storage/table/column_chunk_data.cpp:518–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

516}
517
518void ColumnChunkData::populateWithDefaultVal(ExpressionEvaluator& defaultEvaluator,
519 uint64_t& numValues_, ColumnStats* newColumnStats) {
520 auto numValuesAppended = 0u;
521 const auto numValuesToPopulate = numValues_;
522 while (numValuesAppended < numValuesToPopulate) {
523 const auto numValuesToAppend =
524 std::min(DEFAULT_VECTOR_CAPACITY, numValuesToPopulate - numValuesAppended);
525 defaultEvaluator.evaluate(numValuesToAppend);
526 auto resultVector = defaultEvaluator.resultVector.get();
527 DASSERT(resultVector->state->getSelVector().getSelSize() == numValuesToAppend);
528 append(resultVector, resultVector->state->getSelVector());
529 if (newColumnStats) {
530 newColumnStats->update(resultVector);
531 }
532 numValuesAppended += numValuesToAppend;
533 }
534}
535
536void ColumnChunkData::copyVectorToBuffer(ValueVector* vector, offset_t startPosInChunk,
537 const SelectionView& selView) {

Callers 1

addColumnMethod · 0.45

Calls 4

getSelSizeMethod · 0.80
evaluateMethod · 0.45
getMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected