| 344 | |
| 345 | template <bool ASYNC_BUILD> |
| 346 | Status BlockingJoinNode::SendBuildInputToSink( |
| 347 | RuntimeState* state, JoinBuilder* build_sink) { |
| 348 | DCHECK(!UseSeparateBuild(state->query_options())); |
| 349 | RETURN_IF_ERROR(build_sink->Open(state)); |
| 350 | DCHECK_EQ(build_batch_->num_rows(), 0); |
| 351 | bool eos = false; |
| 352 | do { |
| 353 | RETURN_IF_CANCELLED(state); |
| 354 | RETURN_IF_ERROR(QueryMaintenance(state)); |
| 355 | { |
| 356 | CONDITIONAL_SCOPED_CONCURRENT_STOP_WATCH( |
| 357 | &built_probe_overlap_stop_watch_, ASYNC_BUILD); |
| 358 | RETURN_IF_ERROR(child(1)->GetNext(state, build_batch_.get(), &eos)); |
| 359 | } |
| 360 | RETURN_IF_ERROR(build_sink->Send(state, build_batch_.get())); |
| 361 | build_batch_->Reset(); |
| 362 | } while (!eos); |
| 363 | RETURN_IF_ERROR(build_sink->FlushFinal(state)); |
| 364 | return Status::OK(); |
| 365 | } |
| 366 | |
| 367 | void BlockingJoinNode::DebugString(int indentation_level, stringstream* out) const { |
| 368 | *out << string(indentation_level * 2, ' '); |