| 195 | } |
| 196 | |
| 197 | void ScanNode::Close(RuntimeState* state) { |
| 198 | if (is_closed()) return; |
| 199 | // Compute effective filters by checking if any rows were rejected. |
| 200 | for (const auto& filter_ctx : filter_ctxs_) { |
| 201 | if (filter_ctx.stats != nullptr && filter_ctx.stats->HasRejectedRows()) { |
| 202 | effective_filter_ids_.push_back(filter_ctx.filter->id()); |
| 203 | } |
| 204 | } |
| 205 | // Close filter |
| 206 | for (auto& filter_ctx : filter_ctxs_) { |
| 207 | if (filter_ctx.expr_eval != nullptr) filter_ctx.expr_eval->Close(state); |
| 208 | } |
| 209 | // ScanNode::Prepare() started periodic counters including 'total_throughput_counter_' |
| 210 | // and 'bytes_read_timeseries_counter_'. Subclasses may also have started counters. |
| 211 | runtime_profile_->StopPeriodicCounters(); |
| 212 | ExecNode::Close(state); |
| 213 | } |
| 214 | |
| 215 | bool ScanNode::WaitForRuntimeFilters() { |
| 216 | int32_t wait_time_ms = FLAGS_runtime_filter_wait_time_ms; |
nothing calls this directly
no test coverage detected