| 93 | } |
| 94 | |
| 95 | Status ScannerContext::AddAndStartStream( |
| 96 | ScanRange* range, int64_t reservation, ScannerContext::Stream** stream) { |
| 97 | DCHECK(stream != nullptr); |
| 98 | DiskIoMgr* io_mgr = ExecEnv::GetInstance()->disk_io_mgr(); |
| 99 | bool needs_buffers; |
| 100 | RETURN_IF_ERROR(scan_node_->reader_context()->StartScanRange(range, &needs_buffers)); |
| 101 | if (needs_buffers) { |
| 102 | RETURN_IF_ERROR(io_mgr->AllocateBuffersForRange(bp_client(), range, reservation)); |
| 103 | } |
| 104 | *stream = AddStream(range, reservation); |
| 105 | DCHECK(*stream != nullptr); |
| 106 | return Status::OK(); |
| 107 | } |
| 108 | |
| 109 | void ScannerContext::Stream::ReleaseCompletedResources(bool done) { |
| 110 | if (done) { |
no test coverage detected