| 524 | } |
| 525 | |
| 526 | Status PhjBuilder::CreateHashPartitions(int level) { |
| 527 | DCHECK(hash_partitions_.empty()); |
| 528 | ht_ctx_->set_level(level); // Set the hash function for partitioning input. |
| 529 | for (int i = 0; i < PARTITION_FANOUT; ++i) { |
| 530 | unique_ptr<PhjBuilderPartition> new_partition; |
| 531 | RETURN_IF_ERROR(CreateAndPreparePartition(level, &new_partition)); |
| 532 | hash_partitions_.push_back(std::move(new_partition)); |
| 533 | } |
| 534 | COUNTER_ADD(partitions_created_, PARTITION_FANOUT); |
| 535 | COUNTER_SET(max_partition_level_, level); |
| 536 | return Status::OK(); |
| 537 | } |
| 538 | |
| 539 | bool PhjBuilder::AppendRowStreamFull( |
| 540 | BufferedTupleStream* stream, TupleRow* row, Status* status) noexcept { |