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

Method addSpilledRowInput

bolt/exec/HashBuild.cpp:512–532  ·  view source on GitHub ↗

add spilled Rows

Source from the content-addressed store, hash-verified

510
511// add spilled Rows
512void HashBuild::addSpilledRowInput(std::vector<char*>& rows, uint32_t size) {
513 if (rows.empty()) {
514 return;
515 }
516 // TODO: support directly respill rows read from spiller
517 // now direct copy spilled rows to table, increase the risic of OOM
518
519 // even though ensureInputFits return false, we still need to spill rows
520 ensureInputFits(input_, {&rows, size});
521 auto spillStep = 1024;
522 auto container = table_->rows();
523 for (auto id = 0; id < rows.size(); id += spillStep) {
524 auto step = std::min<int>(spillStep, rows.size() - id);
525 activeRows_.resize(step);
526 activeRows_.setAll();
527 for (auto j = id; j < id + step; ++j) {
528 container->copySerializedRow(rows[j], rowFormatInfo_.get());
529 }
530 spillRowBasedInput();
531 }
532}
533
534void HashBuild::addInput(RowVectorPtr input) {
535 checkRunning();

Callers

nothing calls this directly

Calls 7

setAllMethod · 0.80
copySerializedRowMethod · 0.80
emptyMethod · 0.45
rowsMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected