yiguolei commented on code in PR #48368: URL: https://github.com/apache/doris/pull/48368#discussion_r1974717162
########## be/src/runtime/result_buffer_mgr.cpp: ########## @@ -108,28 +116,33 @@ std::shared_ptr<BufferControlBlock> ResultBufferMgr::find_control_block(const TU Status ResultBufferMgr::find_arrow_schema(const TUniqueId& finst_id, std::shared_ptr<arrow::Schema>* schema) { - std::shared_ptr<BufferControlBlock> cb = find_control_block(finst_id); + std::shared_ptr<ResultBlockBufferBase> cb = find_control_block(finst_id); if (cb == nullptr) { return Status::InternalError( "no arrow schema for this query, maybe query has been canceled, finst_id={}", print_id(finst_id)); } - return cb->find_arrow_schema(schema); + return assert_cast<vectorized::ArrowFlightResultBlockBuffer*>(cb.get())->find_schema(schema); } -void ResultBufferMgr::fetch_data(const PUniqueId& finst_id, GetResultBatchCtx* ctx) { +void ResultBufferMgr::fetch_data(const PUniqueId& finst_id, + std::shared_ptr<vectorized::GetResultBatchCtx> ctx) { TUniqueId tid = UniqueId(finst_id).to_thrift(); - std::shared_ptr<BufferControlBlock> cb = find_control_block(tid); + std::shared_ptr<ResultBlockBufferBase> cb = find_control_block(tid); if (cb == nullptr) { ctx->on_failure(Status::InternalError("no result for this query, tid={}", print_id(tid))); return; } - cb->get_batch(ctx); + if (auto status = assert_cast<vectorized::NormalResultBlockBuffer*>(cb.get())->get_batch(ctx); Review Comment: 这里为什么还要cast? -- 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