| 198 | } |
| 199 | |
| 200 | Status PartitionedHashJoinNode::Open(RuntimeState* state) { |
| 201 | SCOPED_TIMER(runtime_profile_->total_time_counter()); |
| 202 | ScopedOpenEventAdder ea(this); |
| 203 | JoinBuilder* tmp_builder = nullptr; |
| 204 | RETURN_IF_ERROR(BlockingJoinNode::OpenImpl(state, &tmp_builder)); |
| 205 | if (builder_ == nullptr) { |
| 206 | DCHECK(UseSeparateBuild(state->query_options())); |
| 207 | builder_ = dynamic_cast<PhjBuilder*>(tmp_builder); |
| 208 | DCHECK(builder_ != nullptr); |
| 209 | } |
| 210 | RETURN_IF_ERROR(ht_ctx_->Open(state)); |
| 211 | RETURN_IF_ERROR(ScalarExprEvaluator::Open(other_join_conjunct_evals_, state)); |
| 212 | |
| 213 | // Check for errors and free expr result allocations before opening children. |
| 214 | RETURN_IF_CANCELLED(state); |
| 215 | RETURN_IF_ERROR(QueryMaintenance(state)); |
| 216 | // The prepare functions of probe expressions may have made result allocations implicitly |
| 217 | // (e.g. calling UdfBuiltins::Lower()). The probe expressions' expr result allocations need to |
| 218 | // be cleared now as they don't get cleared again till probing. Other exprs' result allocations |
| 219 | // are cleared in QueryMaintenance(). |
| 220 | probe_expr_results_pool_->Clear(); |
| 221 | |
| 222 | RETURN_IF_ERROR(BlockingJoinNode::ProcessBuildInputAndOpenProbe(state, builder_)); |
| 223 | |
| 224 | RETURN_IF_ERROR( |
| 225 | builder_->BeginInitialProbe(buffer_pool_client(), &build_hash_partitions_)); |
| 226 | RETURN_IF_ERROR(PrepareForPartitionedProbe()); |
| 227 | |
| 228 | RETURN_IF_ERROR(BlockingJoinNode::GetFirstProbeRow(state)); |
| 229 | ResetForProbe(); |
| 230 | probe_state_ = ProbeState::PROBING_IN_BATCH; |
| 231 | DCHECK(null_aware_probe_partition_ == nullptr |
| 232 | || join_op_ == TJoinOp::NULL_AWARE_LEFT_ANTI_JOIN); |
| 233 | return Status::OK(); |
| 234 | } |
| 235 | |
| 236 | Status PartitionedHashJoinNode::AcquireResourcesForBuild(RuntimeState* state) { |
| 237 | if (!buffer_pool_client()->is_registered()) { |
nothing calls this directly
no test coverage detected