| 458 | } |
| 459 | |
| 460 | Status FragmentInstanceState::Open() { |
| 461 | DCHECK(!opened_promise_.IsSet()); |
| 462 | DCHECK_EQ(current_state_.Load(), FInstanceExecStatePB::WAITING_FOR_PREPARE); |
| 463 | SCOPED_TIMER2(profile()->total_time_counter(), |
| 464 | ADD_TIMER(timings_profile_, OPEN_TIMER_NAME)); |
| 465 | SCOPED_THREAD_COUNTER_MEASUREMENT(runtime_state_->total_thread_statistics()); |
| 466 | |
| 467 | if (fragment_state_->ShouldCodegen()) { |
| 468 | UpdateState(StateEvent::CODEGEN_START); |
| 469 | RETURN_IF_ERROR(fragment_state_->InvokeCodegen(event_sequence_)); |
| 470 | } |
| 471 | |
| 472 | { |
| 473 | UpdateState(StateEvent::OPEN_START); |
| 474 | // Inject failure if debug actions are enabled. |
| 475 | RETURN_IF_ERROR(DebugAction(query_state_->query_options(), "FIS_IN_OPEN")); |
| 476 | |
| 477 | SCOPED_TIMER(ADD_CHILD_TIMER(timings_profile_, "ExecTreeOpenTime", OPEN_TIMER_NAME)); |
| 478 | RETURN_IF_ERROR(exec_tree_->Open(runtime_state_)); |
| 479 | } |
| 480 | return sink_->Open(runtime_state_); |
| 481 | } |
| 482 | |
| 483 | Status FragmentInstanceState::ExecInternal() { |
| 484 | DCHECK_EQ(current_state_.Load(), FInstanceExecStatePB::WAITING_FOR_OPEN); |
nothing calls this directly
no test coverage detected