| 1471 | } |
| 1472 | |
| 1473 | void 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 | |
| 1509 | void HashBuild::addRuntimeStats() { |
| 1510 | // Report range sizes and number of distinct values for the join keys. |
nothing calls this directly
no test coverage detected