MCPcopy Create free account
hub / github.com/bytedance/bolt / storeRows

Method storeRows

bolt/exec/SpillableWindowBuild.cpp:406–428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404
405template <bool needSort>
406void SpillableWindowBuild<needSort>::storeRows() {
407 BOLT_CHECK_GT(accumulatedLength_, 0);
408 BOLT_CHECK_NOT_NULL(info_);
409 char* newRows = nullptr;
410 newRows =
411 reinterpret_cast<char*>(data_->pool()->allocate(accumulatedLength_));
412 allocatedStarts_.push_back(newRows);
413 allocatedSizes_.push_back(accumulatedLength_);
414 int64_t offset = 0;
415 char* dest = nullptr;
416 for (auto i = 0; i < tmpSortedRows_.size(); i++) {
417 dest = newRows + offset;
418 ContainerRow2RowSerde::copyRow(
419 dest, tmpSortedRows_[i], tmpSortedRowsSize_[i], *info_);
420 offset += tmpSortedRowsSize_[i];
421 inputRows_.push_back(dest);
422 }
423 previousRow_ = dest;
424 lastRowSize_ = tmpSortedRowsSize_.back();
425 tmpSortedRows_.clear();
426 tmpSortedRowsSize_.clear();
427 accumulatedLength_ = 0;
428}
429
430template <bool needSort>
431void SpillableWindowBuild<needSort>::loadNextPartitionFromSpill() {

Callers

nothing calls this directly

Calls 7

copyRowFunction · 0.85
backMethod · 0.80
allocateMethod · 0.45
poolMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected