| 1042 | } |
| 1043 | |
| 1044 | Status PartitionedHashJoinNode::CreateProbeHashPartitions( |
| 1045 | bool* have_spilled_hash_partitions) { |
| 1046 | DCHECK_EQ(PARTITION_FANOUT, build_hash_partitions_.hash_partitions->size()); |
| 1047 | *have_spilled_hash_partitions = false; |
| 1048 | probe_hash_partitions_.resize(PARTITION_FANOUT); |
| 1049 | for (int i = 0; i < PARTITION_FANOUT; ++i) { |
| 1050 | PhjBuilderPartition* build_partition = |
| 1051 | (*build_hash_partitions_.hash_partitions)[i].get(); |
| 1052 | if (build_partition->IsClosed() || !build_partition->is_spilled()) continue; |
| 1053 | *have_spilled_hash_partitions = true; |
| 1054 | DCHECK(probe_hash_partitions_[i] == nullptr); |
| 1055 | // Put partition into vector so it will be cleaned up in CloseAndDeletePartitions() |
| 1056 | // if Init() fails. |
| 1057 | probe_hash_partitions_[i] = |
| 1058 | make_unique<ProbePartition>(runtime_state_, this, build_partition); |
| 1059 | RETURN_IF_ERROR(probe_hash_partitions_[i]->PrepareForWrite(this, false)); |
| 1060 | } |
| 1061 | return Status::OK(); |
| 1062 | } |
| 1063 | |
| 1064 | Status PartitionedHashJoinNode::PrepareForUnpartitionedProbe() { |
| 1065 | DCHECK_ENUM_EQ(builder_->state(), HashJoinState::PROBING_SPILLED_PARTITION); |
nothing calls this directly
no test coverage detected