AshinGau commented on code in PR #30746: URL: https://github.com/apache/doris/pull/30746#discussion_r1477312014
########## be/src/pipeline/exec/scan_operator.cpp: ########## @@ -1456,36 +1450,19 @@ Status ScanOperatorX<LocalStateType>::get_block(RuntimeState* state, vectorized: }}; if (state->is_cancelled()) { - // ISSUE: https://github.com/apache/doris/issues/16360 - // _scanner_ctx may be null here, see: `VScanNode::alloc_resource` (_eos == null) - if (local_state._scanner_ctx) { - local_state._scanner_ctx->set_status_on_error(Status::Cancelled("query cancelled")); - return local_state._scanner_ctx->status(); - } else { - return Status::Cancelled("query cancelled"); - } + return Status::Cancelled("query cancelled"); } if (local_state._eos) { source_state = SourceState::FINISHED; return Status::OK(); } - vectorized::BlockUPtr scan_block = nullptr; bool eos = false; - RETURN_IF_ERROR(local_state._scanner_ctx->get_block_from_queue(state, &scan_block, &eos, 0)); - if (eos) { - source_state = SourceState::FINISHED; - DCHECK(scan_block == nullptr); - return Status::OK(); - } - - // get scanner's block memory - block->swap(*scan_block); - local_state._scanner_ctx->return_free_block(std::move(scan_block)); + RETURN_IF_ERROR(local_state._scanner_ctx->get_block_from_queue(state, block, &eos, 0)); Review Comment: It's not the `bool wait`, but `int id` in `get_block_from_queue`. `int id` is used in collocated aggregation. However, it's no longer used, but still remain API here, will be removed in next PR. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org