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

Method processSpillInput

bolt/exec/HashBuild.cpp:1473–1507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1471}
1472
1473void HashBuild::processSpillInput() {
1474 checkRunning();
1475 {
1476 DeltaCpuWallTimer timer{[this](const CpuWallTiming& timing) {
1477 auto selfDelta = operatorCtx_->driver()->processLazyTiming(*this, timing);
1478 this->stats().wlock()->addInputTiming.add(selfDelta);
1479 }};
1480
1481 if (spillConfig_->rowBasedSpillMode == common::RowBasedSpillMode::DISABLE) {
1482 while (spillInputReader_->nextBatch(input_)) {
1483 addInput(std::move(input_));
1484 if (!isRunning()) {
1485 return;
1486 }
1487 }
1488 } else { // read row based spill input
1489 std::vector<char*> rows;
1490 while (auto size = spillInputReader_->nextBatch(rows)) {
1491 if (size == 0) {
1492 break;
1493 }
1494 addSpilledRowInput(rows, size);
1495 if (!isRunning()) {
1496 return;
1497 }
1498 }
1499 }
1500 }
1501 recordSpillReadStats();
1502 DeltaCpuWallTimer timer{[this](const CpuWallTiming& timing) {
1503 this->stats().wlock()->finishTiming.add(timing);
1504 }};
1505 noMoreInputInternal();
1506 restoringRangePartition_ = false;
1507}
1508
1509void HashBuild::addRuntimeStats() {
1510 // Report range sizes and number of distinct values for the join keys.

Callers

nothing calls this directly

Calls 5

processLazyTimingMethod · 0.80
driverMethod · 0.80
addMethod · 0.45
statsMethod · 0.45
nextBatchMethod · 0.45

Tested by

no test coverage detected