| 173 | } |
| 174 | |
| 175 | void HdfsScanNode::Close(RuntimeState* state) { |
| 176 | if (is_closed()) return; |
| 177 | SetDone(); |
| 178 | if (thread_avail_cb_id_ != -1) { |
| 179 | state->resource_pool()->RemoveThreadAvailableCb(thread_avail_cb_id_); |
| 180 | } |
| 181 | thread_state_.Close(this); |
| 182 | #ifndef NDEBUG |
| 183 | // At this point, the other threads have been joined, and |
| 184 | // remaining_scan_range_submissions_ should be 0, if the |
| 185 | // query started and wasn't cancelled or exited early. |
| 186 | if (ranges_issued_barrier_.pending() == 0 && initial_ranges_issued_.Load() |
| 187 | && shared_state_->progress().done()) { |
| 188 | DCHECK_EQ(shared_state_->RemainingScanRangeSubmissions(), 0); |
| 189 | } |
| 190 | #endif |
| 191 | HdfsScanNodeBase::Close(state); |
| 192 | } |
| 193 | |
| 194 | void HdfsScanNode::RangeComplete(const THdfsFileFormat::type& file_type, |
| 195 | const std::vector<THdfsCompression::type>& compression_type, bool skipped) { |
no test coverage detected