| 207 | } |
| 208 | |
| 209 | Status BlockingJoinNode::OpenImpl(RuntimeState* state, JoinBuilder** separate_builder) { |
| 210 | RETURN_IF_ERROR(ExecNode::Open(state)); |
| 211 | eos_ = false; |
| 212 | probe_side_eos_ = false; |
| 213 | |
| 214 | if (open_called_) return Status::OK(); |
| 215 | // The below code should only run once. |
| 216 | if (UseSeparateBuild(state->query_options())) { |
| 217 | // Find the input fragment's build sink. We do this in the Open() phase so we don't |
| 218 | // block this finstance's Prepare() phase on the build finstance's Prepare() phase. |
| 219 | RETURN_IF_ERROR(LookupSeparateJoinBuilder(state, separate_builder)); |
| 220 | } else { |
| 221 | // The integrated join build requires some tricky time accounting because two |
| 222 | // threads execute concurrently with the time from the left and right child |
| 223 | // overlapping. We also want to count the builder profile as local time. |
| 224 | // The separate join build does not have this problem, because |
| 225 | // the build is executed in a separate fragment with a separate profile tree. |
| 226 | runtime_profile_->AddLocalTimeCounter(bind<int64_t>( |
| 227 | &BlockingJoinNode::LocalTimeCounterFn, runtime_profile_->total_time_counter(), |
| 228 | child(0)->runtime_profile()->total_time_counter(), |
| 229 | child(1)->runtime_profile()->total_time_counter(), |
| 230 | &built_probe_overlap_stop_watch_)); |
| 231 | } |
| 232 | open_called_ = true; |
| 233 | return Status::OK(); |
| 234 | } |
| 235 | |
| 236 | Status BlockingJoinNode::ProcessBuildInputAndOpenProbe( |
| 237 | RuntimeState* state, JoinBuilder* build_sink) { |
nothing calls this directly
no test coverage detected