Returns true if a valid limit is set and number of rows returned by this node has exceeded the limit. Thread safe version of ReachedLimit().
| 339 | /// Returns true if a valid limit is set and number of rows returned by this node has |
| 340 | /// exceeded the limit. Thread safe version of ReachedLimit(). |
| 341 | bool ReachedLimitShared() { |
| 342 | // Ideally this function should only be called when num_rows_returned_ is shared by |
| 343 | // multiple threads. Both the HdfsScanNodeMt and KuduScanNodeMt call this function |
| 344 | // from the scanner code-path for simplicity. |
| 345 | DCHECK( |
| 346 | getExecutionModel() == NON_TASK_BASED_SYNC || getExecutionModel() == TASK_BASED); |
| 347 | return limit_ != -1 && base::subtle::Acquire_Load(&num_rows_returned_) >= limit_; |
| 348 | } |
| 349 | |
| 350 | RuntimeProfile* runtime_profile() { return runtime_profile_; } |
| 351 | MemTracker* mem_tracker() { return mem_tracker_.get(); } |
no test coverage detected